summaryrefslogtreecommitdiff
path: root/os
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2016-09-22 02:53:45 +0300
committerJeremy Huddleston Sequoia <jeremyhu@apple.com>2016-09-22 14:55:00 -0700
commit1d365f1ffe0362732b64e565db6ae8af718758f2 (patch)
tree511fc692f629d7c9c3eaf0b3c33139e0775c9881 /os
parentd0c5d205a919fc1d2eb599356090b58b1bf0176d (diff)
os: Ready clients with pending output aren't flushed, so set NewOutputPending
When a client with pending output is ready (has request data pending), FlushAllOutput will skip it to get all of the requests processed before sending any queued output. That means FlushAllOutput is going to return with some output pending to a client which isn't known to be write blocked. And that means NewOutputPending needs to be set so that FlushAllOutput will get called again to actually go flush this client. It might be interesting to try just flushing the client to send any queued data along the way. This patch just restores the server behavior to what it was before the ospoll changes. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com> Tested-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com> Tested-by: Matthieu Herrb <matthieu@herrb.eu>
Diffstat (limited to 'os')
-rw-r--r--os/io.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/os/io.c b/os/io.c
index ff0ec3da7..5ba1e86b1 100644
--- a/os/io.c
+++ b/os/io.c
@@ -615,7 +615,8 @@ FlushAllOutput(void)
if (!client_is_ready(client)) {
oc = (OsCommPtr) client->osPrivate;
(void) FlushClient(client, oc, (char *) NULL, 0);
- }
+ } else
+ NewOutputPending = TRUE;
}
}