Skip to content

Commit 59b3662

Browse files
committed
socket-win32.cxx: Fix reversed conditional logic.
1 parent 654bfa5 commit 59b3662

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/socket-win32.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -277,13 +277,13 @@ acceptSocket(SOCKET_TYPE sock, SocketState & state)
277277
// Prime the socket to report FD_CLOSE.
278278

279279
int ret = WSAEventSelect (osSocket, close_ev, FD_CLOSE);
280-
if (ret != SOCKET_ERROR)
280+
if (ret == SOCKET_ERROR)
281281
goto error;
282282

283283
// Prime the socket to report FD_ACCEPT.
284284

285285
ret = WSAEventSelect (osSocket, accept_ev, FD_ACCEPT);
286-
if (ret != SOCKET_ERROR)
286+
if (ret == SOCKET_ERROR)
287287
goto error;
288288

289289
WSAEVENT events[2] = { close_ev, accept_ev };

0 commit comments

Comments
 (0)