server: Explicitly shutdown destroyed sockets to force pending poll() calls to return.

This commit is contained in:
Alexandre Julliard 2006-12-04 18:02:02 +01:00
parent 28c5396436
commit 24b64534e5
1 changed files with 6 additions and 1 deletions

View File

@ -583,7 +583,12 @@ static void sock_destroy( struct object *obj )
async_terminate_queue( &sock->write_q, STATUS_CANCELLED );
}
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 */