retval = select(highest + 1, &readfds, NULL, NULL, &tv);
}
else {
+ --num_workers;
return NULL;
}
#if 0
syslog(LOG_DEBUG, "Interrupted select()\n");
#endif
- if (server_shutting_down) return(NULL);
+ if (server_shutting_down) {
+ --num_workers;
+ return(NULL);
+ }
goto do_select;
}
}
else if (retval == 0) {
- if (server_shutting_down) return(NULL);
+ if (server_shutting_down) {
+ --num_workers;
+ return(NULL);
+ }
}
/* It must be a client socket. Find a context that has data