Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52024 Signed-off-by: Zebediah Figura zfigura@codeweavers.com --- dlls/ws2_32/tests/sock.c | 4 ++-- server/sock.c | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c index ec428acaf32..19ff5a711cc 100644 --- a/dlls/ws2_32/tests/sock.c +++ b/dlls/ws2_32/tests/sock.c @@ -5246,8 +5246,8 @@ static void test_accept_events(struct event_test_ctx *ctx) server = accept(listener, NULL, NULL); ok(server != -1, "failed to accept, error %u\n", WSAGetLastError()); ctx->socket = server; - check_events_todo(ctx, FD_WRITE, 0, 200); - check_events_todo_event(ctx, 0, 0, 0); + check_events(ctx, FD_WRITE, 0, 200); + check_events(ctx, 0, 0, 0);
closesocket(server); closesocket(client); diff --git a/server/sock.c b/server/sock.c index 2df4f3d3056..736f34feac5 100644 --- a/server/sock.c +++ b/server/sock.c @@ -722,6 +722,7 @@ static void complete_async_accept( struct sock *sock, struct accept_req *req ) handle = alloc_handle_no_access_check( async_get_thread( async )->process, &acceptsock->obj, GENERIC_READ | GENERIC_WRITE | SYNCHRONIZE, OBJ_INHERIT ); acceptsock->wparam = handle; + sock_reselect( acceptsock ); release_object( acceptsock ); if (!handle) { @@ -2174,6 +2175,7 @@ static void sock_ioctl( struct fd *fd, ioctl_code_t code, struct async *async ) handle = alloc_handle( current->process, &acceptsock->obj, GENERIC_READ | GENERIC_WRITE | SYNCHRONIZE, OBJ_INHERIT ); acceptsock->wparam = handle; + sock_reselect( acceptsock ); release_object( acceptsock ); set_reply_data( &handle, sizeof(handle) ); return;