Zebediah Figura : server: Do not poll sockets for POLLPRI unless we are selecting for AFD_POLL_OOB.
Alexandre Julliard
julliard at winehq.org
Tue Jun 15 16:19:27 CDT 2021
Module: wine
Branch: master
Commit: 2daf76432e3d993972cbb4257883d2e1139496fa
URL: https://source.winehq.org/git/wine.git/?a=commit;h=2daf76432e3d993972cbb4257883d2e1139496fa
Author: Zebediah Figura <z.figura12 at gmail.com>
Date: Tue Jun 15 10:39:44 2021 -0500
server: Do not poll sockets for POLLPRI unless we are selecting for AFD_POLL_OOB.
Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
server/sock.c | 19 ++++++++++++++-----
1 file changed, 14 insertions(+), 5 deletions(-)
diff --git a/server/sock.c b/server/sock.c
index 1d992d8f9e4..e1b30507514 100644
--- a/server/sock.c
+++ b/server/sock.c
@@ -1063,11 +1063,20 @@ static int sock_get_poll_events( struct fd *fd )
{
if (async_waiting( &sock->read_q )) ev |= POLLIN | POLLPRI;
}
- else if (!sock->rd_shutdown && (mask & AFD_POLL_READ))
- ev |= POLLIN | POLLPRI;
- /* We use POLLIN with 0 bytes recv() as hangup indication for stream sockets. */
- else if (sock->state == SOCK_CONNECTED && (mask & AFD_POLL_HUP) && !(sock->reported_events & AFD_POLL_READ))
- ev |= POLLIN;
+ else
+ {
+ if (!sock->rd_shutdown)
+ {
+ if (mask & AFD_POLL_READ)
+ ev |= POLLIN;
+ if (mask & AFD_POLL_OOB)
+ ev |= POLLPRI;
+ }
+
+ /* We use POLLIN with 0 bytes recv() as hangup indication for stream sockets. */
+ if (sock->state == SOCK_CONNECTED && (mask & AFD_POLL_HUP) && !(sock->reported_events & AFD_POLL_READ))
+ ev |= POLLIN;
+ }
if (async_queued( &sock->write_q ))
{
More information about the wine-cvs
mailing list