server: Clear sock->errors[AFD_POLL_BIT_CONNECT_ERR] in sock_poll_event().

Give sock_dispatch_events() a more consistent scope.
This commit is contained in:
Zebediah Figura 2022-07-11 23:08:04 -05:00 committed by Alexandre Julliard
parent 293c6d24e3
commit a1fd99cfbb

View file

@ -1090,10 +1090,7 @@ 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;
@ -1149,6 +1146,7 @@ static void sock_poll_event( struct fd *fd, int event )
{ {
sock->state = SOCK_CONNECTED; sock->state = SOCK_CONNECTED;
sock->connect_time = current_time; sock->connect_time = current_time;
sock->errors[AFD_POLL_BIT_CONNECT_ERR] = 0;
} }
break; break;