Module: wine
Branch: master
Commit: cafd260014932bf6a7319dae768a1f43e65176cf
URL: https://source.winehq.org/git/wine.git/?a=commit;h=cafd260014932bf6a7319dae…
Author: Zebediah Figura <zfigura(a)codeweavers.com>
Date: Thu May 5 00:43:25 2022 -0500
server: Do not signal read/write bits if there are read/write asyncs waiting.
This is validated by tests introduced in
59beffb46c813a3de2eae6f28e3f7f321f666e89 etc. This commit alone doesn't fix said
tests, because:
* on this poll, we will alert the waiting async;
* when reselecting, we will still request POLLIN, because the AFD_POLL_READ
request is still active,
* when POLLIN is subsequently signaled, we do not remove it in
sock_dispatch_asyncs(), because we check async_waiting(), not async_queued().
Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
server/sock.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/server/sock.c b/server/sock.c
index 29dd1ca7fa8..db0df5ecf79 100644
--- a/server/sock.c
+++ b/server/sock.c
@@ -1179,10 +1179,9 @@ static void sock_poll_event( struct fd *fd, int event )
break;
}
- complete_async_polls( sock, event, error );
-
event = sock_dispatch_asyncs( sock, event, error );
sock_dispatch_events( sock, prevstate, event, error );
+ complete_async_polls( sock, event, error );
sock_reselect( sock );
}