Calling ioctl(..., SO_ERROR, ...) clears pending socket error. Because of that we may clear the error in poll_socket or IOCTL_AFD_GET_SO_ERROR. This leads to failures during Battle.net installation (it's a race that I can only reproduce on slow machines).
-- v2: server: Don't reset socket error in IOCTL_AFD_GET_SO_ERROR. server: Don't reset socket error in poll_socket. server: Always return Win32 error code from IOCTL_AFD_GET_SO_ERROR.