summaryrefslogtreecommitdiff
path: root/os
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2017-04-29 00:26:10 -0700
committerAdam Jackson <ajax@redhat.com>2017-09-25 15:34:10 -0400
commitd808b573992ae1fc7706d8897a92783b847040e3 (patch)
tree7d46a1df4da47d602475cb4b3add91f1f1d32e93 /os
parent7a2525fba60a04a95a4a8b26c2b628dc8fdfdeff (diff)
os: Mark client as ready to read when closing due to write failure [100863]
This makes sure the server will go look at the client again, notice that the FD is no longer valid and close the client down. Bugzilla: https://bugs.freedesktop.org/100863 Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-and-Tested-by: Michel Dänzer <michel.daenzer@amd.com> (cherry picked from commit e2f68296ffb8e40035c0ebd949b67d1e2e424e11)
Diffstat (limited to 'os')
-rw-r--r--os/io.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/os/io.c b/os/io.c
index 714516ee3..f80580cfc 100644
--- a/os/io.c
+++ b/os/io.c
@@ -636,7 +636,10 @@ SetCriticalOutputPending(void)
/*****************
* AbortClient:
* When a write error occurs to a client, close
- * the connection and clean things up.
+ * the connection and clean things up. Mark
+ * the client as 'ready' so that the server will
+ * try to read from it again, notice that the fd is
+ * closed and clean up from there.
*****************/
static void
@@ -648,6 +651,7 @@ AbortClient(ClientPtr client)
_XSERVTransDisconnect(oc->trans_conn);
_XSERVTransClose(oc->trans_conn);
oc->trans_conn = NULL;
+ mark_client_ready(client);
}
}