Jinoh Kang (@iamahuman) commented about server/sock.c:
- if (getsockopt( get_unix_fd(sock->fd), SOL_SOCKET, SO_ERROR, (void *)error, &len) < 0)
return -1;
- if (sock->state == SOCK_CONNECTING)
- {
if (*error)
sock->errors[AFD_POLL_BIT_CONNECT_ERR] = *error;
else
*error = sock->errors[AFD_POLL_BIT_CONNECT_ERR];
- }
- else if (sock->state == SOCK_LISTENING)
- {
if (*error)
sock->errors[AFD_POLL_BIT_ACCEPT] = *error;
else
*error = sock->errors[AFD_POLL_BIT_CONNECT_ERR];
Do we want the following instead?
```suggestion:-0+0 *error = sock->errors[AFD_POLL_BIT_ACCEPT]; ```