Skip to content
Snippets Groups Projects
Commit 590b10ff authored by deuce's avatar deuce
Browse files

Set socket to INVALID_SOCKET on bind() and listen() failures.

parent cae9f953
No related branches found
No related tags found
No related merge requests found
......@@ -3814,6 +3814,7 @@ void DLLCALL bbs_thread(void* arg)
lprintf("Node %d !ERROR %d binding local spy socket %d to %s"
, i, errno, uspy_listen_socket[i-1], uspy_addr.sun_path);
close_socket(uspy_listen_socket[i-1]);
uspy_listen_socket[i-1]=INVALID_SOCKET;
continue;
}
lprintf("Node %d local spy socket %d bound to %s"
......@@ -3821,6 +3822,7 @@ void DLLCALL bbs_thread(void* arg)
if(listen(uspy_listen_socket[i-1],1)) {
lprintf("Node %d !ERROR %d listening local spy socket %d", i, errno);
close_socket(uspy_listen_socket[i-1]);
uspy_listen_socket[i-1]=INVALID_SOCKET;
continue;
}
uspy_addr_len=sizeof(uspy_addr);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment