face: keep knocking until the rig answers
This commit is contained in:
parent
e314d4fa23
commit
5afa132ff4
1 changed files with 5 additions and 17 deletions
|
|
@ -382,16 +382,8 @@ Singleton {
|
|||
connected: false
|
||||
|
||||
onConnectionStateChanged: {
|
||||
if (sock.connected) {
|
||||
if (sock.connected)
|
||||
pageReadyTimer.restart();
|
||||
} else if (root.joined) {
|
||||
faceConnectTimer.restart();
|
||||
}
|
||||
}
|
||||
|
||||
onError: error => {
|
||||
if (root.joined)
|
||||
faceConnectTimer.restart();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -399,22 +391,18 @@ Singleton {
|
|||
target: root
|
||||
|
||||
function onJoinedChanged() {
|
||||
if (root.joined) {
|
||||
faceConnectTimer.restart();
|
||||
} else {
|
||||
faceConnectTimer.stop();
|
||||
if (!root.joined)
|
||||
sock.connected = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Timer {
|
||||
id: faceConnectTimer
|
||||
interval: 200
|
||||
repeat: false
|
||||
repeat: true
|
||||
triggeredOnStart: true
|
||||
running: root.joined && !sock.connected
|
||||
onTriggered: {
|
||||
if (!root.joined || sock.connected)
|
||||
return;
|
||||
// A failed QLocalSocket does not retry merely because the desired
|
||||
// value remained true. Give it a fresh false -> true edge after
|
||||
// the host has had another moment to bind.
|
||||
|
|
|
|||
Loading…
Reference in a new issue