Commit ddb92239 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

server: Clear the connection error after a successful connection.

parent 53ec99da
...@@ -3344,7 +3344,7 @@ static void test_select(void) ...@@ -3344,7 +3344,7 @@ static void test_select(void)
id = 0xdeadbeef; id = 0xdeadbeef;
ret = getsockopt(fdWrite, SOL_SOCKET, SO_ERROR, (char *)&id, &len); ret = getsockopt(fdWrite, SOL_SOCKET, SO_ERROR, (char *)&id, &len);
ok(!ret, "getsockopt failed with %d\n", WSAGetLastError()); 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); closesocket(fdWrite);
......
...@@ -983,7 +983,10 @@ static void sock_dispatch_events( struct sock *sock, enum connection_state prevs ...@@ -983,7 +983,10 @@ static void sock_dispatch_events( struct sock *sock, enum connection_state prevs
case SOCK_CONNECTING: case SOCK_CONNECTING:
if (event & POLLOUT) if (event & POLLOUT)
{
post_socket_event( sock, AFD_POLL_BIT_CONNECT, 0 ); post_socket_event( sock, AFD_POLL_BIT_CONNECT, 0 );
sock->errors[AFD_POLL_BIT_CONNECT_ERR] = 0;
}
if (event & (POLLERR | POLLHUP)) if (event & (POLLERR | POLLHUP))
post_socket_event( sock, AFD_POLL_BIT_CONNECT_ERR, error ); post_socket_event( sock, AFD_POLL_BIT_CONNECT_ERR, error );
break; break;
......
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