Commit 30a56639 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

server: Do not signal read bits if there are read asyncs alerted.

Asyncs which are alerted but not "waiting" may still consume all data, and we shouldn't signal AFD_POLL_READ or AFD_POLL_OOB in that case. Signed-off-by: 's avatarZebediah Figura <zfigura@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 04b33ef0
...@@ -1001,10 +1001,13 @@ static int sock_dispatch_asyncs( struct sock *sock, int event, int error ) ...@@ -1001,10 +1001,13 @@ static int sock_dispatch_asyncs( struct sock *sock, int event, int error )
if ((event & POLLOUT) && sock->connect_req && sock->connect_req->iosb->status == STATUS_PENDING) if ((event & POLLOUT) && sock->connect_req && sock->connect_req->iosb->status == STATUS_PENDING)
complete_async_connect( sock ); complete_async_connect( sock );
if (event & (POLLIN | POLLPRI) && async_waiting( &sock->read_q )) if ((event & (POLLIN | POLLPRI)) && async_queued( &sock->read_q ))
{ {
if (debug_level) fprintf( stderr, "activating read queue for socket %p\n", sock ); if (async_waiting( &sock->read_q ))
async_wake_up( &sock->read_q, STATUS_ALERTED ); {
if (debug_level) fprintf( stderr, "activating read queue for socket %p\n", sock );
async_wake_up( &sock->read_q, STATUS_ALERTED );
}
event &= ~(POLLIN | POLLPRI); event &= ~(POLLIN | POLLPRI);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment