diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c index 9e7cd3a1d39..75e83927007 100644 --- a/dlls/ws2_32/tests/sock.c +++ b/dlls/ws2_32/tests/sock.c @@ -3344,7 +3344,7 @@ static void test_select(void) id = 0xdeadbeef; ret = getsockopt(fdWrite, SOL_SOCKET, SO_ERROR, (char *)&id, &len); ok(!ret, "getsockopt failed with %d\n", WSAGetLastError()); - todo_wine ok(!id, "got error %u\n", id); + ok(!id, "got error %u\n", id); closesocket(fdWrite); diff --git a/server/sock.c b/server/sock.c index 58e9cf4302a..5fdbf0bd9ba 100644 --- a/server/sock.c +++ b/server/sock.c @@ -983,7 +983,10 @@ static void sock_dispatch_events( struct sock *sock, enum connection_state prevs case SOCK_CONNECTING: if (event & POLLOUT) + { post_socket_event( sock, AFD_POLL_BIT_CONNECT, 0 ); + sock->errors[AFD_POLL_BIT_CONNECT_ERR] = 0; + } if (event & (POLLERR | POLLHUP)) post_socket_event( sock, AFD_POLL_BIT_CONNECT_ERR, error ); break;