Skip to content

Commit

Permalink
dix: Remove clients from input and output ready queues after closing
Browse files Browse the repository at this point in the history
Delay removing the client from these two queues until all potential
I/O has completed in case we mark the client as ready for reading or
with pending output during the close operation.

Bugzilla: https://bugs.freedesktop.org/100957
Signed-off-by: Keith Packard <keithp@keithp.com>
Tested-by: Nick Sarnie <commendsarnex@gmail.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
  • Loading branch information
keith-packard committed May 12, 2017
1 parent c394f6b commit d9e23ea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dix/dispatch.c
Expand Up @@ -3414,7 +3414,6 @@ CloseDownClient(ClientPtr client)
if (grabState != GrabNone && grabClient == client) {
UngrabServer(client);
}
mark_client_not_ready(client);
BITCLEAR(grabWaiters, client->index);
DeleteClientFromAnySelections(client);
ReleaseActiveGrabs(client);
Expand Down Expand Up @@ -3443,8 +3442,9 @@ CloseDownClient(ClientPtr client)
if (ClientIsAsleep(client))
ClientSignal(client);
ProcessWorkQueueZombies();
output_pending_clear(client);
CloseDownConnection(client);
output_pending_clear(client);
mark_client_not_ready(client);

/* If the client made it to the Running stage, nClients has
* been incremented on its behalf, so we need to decrement it
Expand Down

0 comments on commit d9e23ea

Please sign in to comment.