server: Don't poll for POLLOUT if there are alerted write asyncs.

Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2022-05-05 00:43:28 -05:00 committed by Alexandre Julliard
parent 30a56639fd
commit c5541f8a08
1 changed files with 6 additions and 1 deletions

View File

@ -1315,7 +1315,12 @@ static int sock_get_poll_events( struct fd *fd )
if (async_queued( &sock->write_q ))
{
if (async_waiting( &sock->write_q )) ev |= POLLOUT;
/* As with read asyncs above, clear POLLOUT if we have an alerted
* async. */
if (async_waiting( &sock->write_q ))
ev |= POLLOUT;
else
ev &= ~POLLOUT;
}
else if (!sock->wr_shutdown && (mask & AFD_POLL_WRITE))
{