qrexec-daemon: fix pathological break-out-of-wait-loop
If the timeout is 1, attempting to retry would not actually retry, since i would be incremented just after being reset to 0, and would thus break out of the loop.
This commit is contained in:
parent
e88faee9dd
commit
5e4e1fe6ac
@ -173,7 +173,7 @@ void init(int xid)
|
|||||||
fprintf(stderr, ".");
|
fprintf(stderr, ".");
|
||||||
if (i==startup_timeout-1) {
|
if (i==startup_timeout-1) {
|
||||||
if (ask_on_connect_timeout(xid, startup_timeout))
|
if (ask_on_connect_timeout(xid, startup_timeout))
|
||||||
i=0;
|
i=-1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
fprintf(stderr, "Cannot connect to qrexec agent for %d seconds, giving up\n", startup_timeout);
|
fprintf(stderr, "Cannot connect to qrexec agent for %d seconds, giving up\n", startup_timeout);
|
||||||
|
Loading…
Reference in New Issue
Block a user