Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52335 Signed-off-by: Zebediah Figura zfigura@codeweavers.com --- dlls/ws2_32/tests/sock.c | 5 ++--- server/sock.c | 5 +++++ 2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c index db6819e77cf..c00d25fec3e 100644 --- a/dlls/ws2_32/tests/sock.c +++ b/dlls/ws2_32/tests/sock.c @@ -5212,9 +5212,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()); diff --git a/server/sock.c b/server/sock.c index 736f34feac5..c7378306511 100644 --- a/server/sock.c +++ b/server/sock.c @@ -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; }