Commit 9632048c authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

server: Set the event in IOCTL_AFD_EVENT_SELECT if the socket becomes signaled.

parent 131f9135
......@@ -5159,9 +5159,8 @@ static void test_accept_events(struct event_test_ctx *ctx)
select_events(ctx, listener, FD_CONNECT | FD_READ | FD_OOB | FD_ACCEPT);
ret = WaitForSingleObject(ctx->event, 0);
todo_wine ok(!ret, "wait timed out\n");
if (!ret)
check_events(ctx, FD_ACCEPT, 0, 0);
ok(!ret, "wait timed out\n");
check_events(ctx, FD_ACCEPT, 0, 0);
server = accept(listener, NULL, NULL);
ok(server != -1, "failed to accept, error %u\n", WSAGetLastError());
......
......@@ -2543,6 +2543,11 @@ static void sock_ioctl( struct fd *fd, ioctl_code_t code, struct async *async )
sock->nonblocking = 1;
sock_reselect( sock );
/* Explicitly wake the socket up if the mask causes it to become
* signaled. Note that reselecting isn't enough, since we might already
* have had events recorded in sock->reported_events and we don't want
* to select for them again. */
sock_wake_up( sock );
return;
}
......
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