Skip to content
Snippets Groups Projects
Commit f2d3c07c authored by rswindell's avatar rswindell
Browse files

If one service fails to bind or listen, the other services will continue to function.

parent fb9e68c6
No related branches found
No related tags found
No related merge requests found
......@@ -1054,6 +1054,8 @@ void DLLCALL services_thread(void* arg)
/* Open and Bind Listening Sockets */
for(i=0;i<(int)services;i++) {
service[i].socket=INVALID_SOCKET;
if((socket = open_socket(SOCK_STREAM))==INVALID_SOCKET) {
lprintf("!ERROR %d opening socket", ERROR_VALUE);
cleanup(1);
......@@ -1100,6 +1102,8 @@ void DLLCALL services_thread(void* arg)
FD_ZERO(&socket_set);
high_socket=0;
for(i=0;i<(int)services;i++) {
if(service[i].socket==INVALID_SOCKET)
continue;
FD_SET(service[i].socket,&socket_set);
if(service[i].socket>high_socket)
high_socket=service[i].socket;
......
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