server: Check socket flags after all sockets got processed.

In rare cases we get an event during the second iteration of the loop,
changing the first element. This would lead to an assertion later.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55054
This commit is contained in:
Fabian Maurer 2023-11-30 22:50:57 +01:00 committed by Alexandre Julliard
parent c241468f16
commit 13928e0855

View file

@ -3509,7 +3509,10 @@ static void poll_socket( struct sock *poll_sock, struct async *async, int exclus
req->sockets[i].flags |= AFD_POLL_CONNECT_ERR;
req->sockets[i].status = sock_get_ntstatus( sock->errors[AFD_POLL_BIT_CONNECT_ERR] );
}
}
for (i = 0; i < count; ++i)
{
if (req->sockets[i].flags)
signaled = TRUE;
}