os: Don't call ospoll_listen/ospoll_mute after connection is closed
In set_poll_client, check oc->trans_conn to make sure the connection is still running before changing the ospoll configuration of the file descriptor in case some other bit of the server is now using this file descriptor. Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
parent
523d35e3e1
commit
448a5586e9
|
@ -1084,10 +1084,12 @@ set_poll_client(ClientPtr client)
|
|||
{
|
||||
OsCommPtr oc = (OsCommPtr) client->osPrivate;
|
||||
|
||||
if (listen_to_client(client))
|
||||
ospoll_listen(server_poll, oc->fd, X_NOTIFY_READ);
|
||||
else
|
||||
ospoll_mute(server_poll, oc->fd, X_NOTIFY_READ);
|
||||
if (oc->trans_conn) {
|
||||
if (listen_to_client(client))
|
||||
ospoll_listen(server_poll, oc->trans_conn->fd, X_NOTIFY_READ);
|
||||
else
|
||||
ospoll_mute(server_poll, oc->trans_conn->fd, X_NOTIFY_READ);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Reference in New Issue
Block a user