a refused subscribe stays refused; it was re-arming its own retry
This commit is contained in:
parent
9b470b8e22
commit
b71f9c9d4f
1 changed files with 10 additions and 2 deletions
|
|
@ -75,6 +75,12 @@ Singleton {
|
|||
// True once the compositor has accepted a `subscribe` and is pushing canvas
|
||||
// changes down the second socket below.
|
||||
property bool subscribed: false
|
||||
// A compositor that does not serve `subscribe` will not start serving it
|
||||
// while it is running. Latch the refusal, or the disconnect that follows it
|
||||
// re-arms the retry that the refusal just stopped — which is a reconnect
|
||||
// loop at timer speed against a socket that will keep saying no. Cleared by
|
||||
// the shell restarting, which is also when the compositor has changed.
|
||||
property bool _pushRefused: false
|
||||
|
||||
// The poll, which now exists only as the fallback for a compositor too old
|
||||
// to push.
|
||||
|
|
@ -141,7 +147,8 @@ Singleton {
|
|||
// Either the compositor went away or it never served the op.
|
||||
// Both mean the poll is the truth again until we get back in.
|
||||
root.subscribed = false;
|
||||
resubscribe.restart();
|
||||
if (!root._pushRefused)
|
||||
resubscribe.restart();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -165,6 +172,7 @@ Singleton {
|
|||
+ (reply.code || "refused")
|
||||
+ "); falling back to the 2 s poll");
|
||||
root.subscribed = false;
|
||||
root._pushRefused = true;
|
||||
resubscribe.stop();
|
||||
feed.connected = false;
|
||||
return;
|
||||
|
|
@ -183,7 +191,7 @@ Singleton {
|
|||
id: resubscribe
|
||||
interval: 5000
|
||||
repeat: false
|
||||
onTriggered: if (!root.subscribed) feed.connected = true
|
||||
onTriggered: if (!root.subscribed && !root._pushRefused) feed.connected = true
|
||||
}
|
||||
|
||||
// Requests waiting on a connection. A queue rather than SessiondPolicy's
|
||||
|
|
|
|||
Loading…
Reference in a new issue