server: Don't release client fd in do_disconnect for pipes in server-side I/O mode.

If server closes without disconnect, it should be still possible to read
remaining buffered data.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Jacek Caban 2017-03-23 15:42:13 +01:00 committed by Alexandre Julliard
parent 56ae76ce84
commit 197674669e
1 changed files with 5 additions and 2 deletions

View File

@ -452,8 +452,11 @@ static void do_disconnect( struct pipe_server *server )
{ {
assert( server->client->server == server ); assert( server->client->server == server );
assert( server->client->pipe_end.fd ); assert( server->client->pipe_end.fd );
release_object( server->client->pipe_end.fd ); if (!use_server_io( &server->pipe_end ))
server->client->pipe_end.fd = NULL; {
release_object( server->client->pipe_end.fd );
server->client->pipe_end.fd = NULL;
}
} }
assert( server->pipe_end.fd ); assert( server->pipe_end.fd );
if (!use_server_io( &server->pipe_end )) if (!use_server_io( &server->pipe_end ))