[PATCH 2/4] server: Record the error for connected and connectionless sockets sockets in sock_error().