This commit is contained in:
Enrico Weigelt 2026-10-21 08:13:22 +10:00 • committed by GitHub
commit ff4563b338
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -196,8 +196,15 @@ WaitForSomething(Bool are_ready)
timeout = 0;
BlockHandler(&timeout);
if (NewOutputPending)
FlushAllOutput();
/* Always try to flush out anything we have, even for clients that had
been stuck for a short while because we've tried to send out too
much at once. If we'd only do it when someting *new* is in the queue,
then those clients might get stuck for long time, until something else
triggers the flush by mere accident.
*/
FlushAllOutput();
/* keep this check close to select() call to minimize race */
if (dispatchException)
i = -1;