server: Explicitly shutdown destroyed sockets to force pending poll() calls to return.
This commit is contained in:
parent
28c5396436
commit
24b64534e5
|
@ -583,7 +583,12 @@ static void sock_destroy( struct object *obj )
|
||||||
async_terminate_queue( &sock->write_q, STATUS_CANCELLED );
|
async_terminate_queue( &sock->write_q, STATUS_CANCELLED );
|
||||||
}
|
}
|
||||||
if (sock->event) release_object( sock->event );
|
if (sock->event) release_object( sock->event );
|
||||||
if (sock->fd) release_object( sock->fd );
|
if (sock->fd)
|
||||||
|
{
|
||||||
|
/* shut the socket down to force pending poll() calls in the client to return */
|
||||||
|
shutdown( get_unix_fd(sock->fd), SHUT_RDWR );
|
||||||
|
release_object( sock->fd );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* create a new and unconnected socket */
|
/* create a new and unconnected socket */
|
||||||
|
|
Loading…
Reference in New Issue