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.
release2
Vincent Penquerc'h 11 years ago committed by Marek Marczykowski-Górecki
parent e88faee9dd
commit 5e4e1fe6ac

@ -173,7 +173,7 @@ void init(int xid)
fprintf(stderr, ".");
if (i==startup_timeout-1) {
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);

Loading…
Cancel
Save