server: Clear the connection error after a successful connection.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
53ec99daeb
commit
ddb9223915
|
@ -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
|
||||||
|
|
||||||
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;
|
||||||
|
|
Loading…
Reference in New Issue