Skip to content

Commit 6531fbb

Browse files
committed
FIX: ATRONIX: Close the socket before raising an error
(cherry picked from commit 3f0a9b5)
1 parent 4918d8a commit 6531fbb

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/os/dev-net.c

+1
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,7 @@ static REBOOL Nonblocking_Mode(SOCKET sock)
220220
// Set socket to non-blocking async mode:
221221
if (!Nonblocking_Mode(sock->socket)) {
222222
sock->error = GET_ERROR;
223+
CLOSE_SOCKET(sock->socket);
223224
Signal_Device(sock, EVT_ERROR);
224225
return DR_ERROR;
225226
}

0 commit comments

Comments
 (0)