Skip to content
Snippets Groups Projects
Commit 1f54e62b authored by deuce's avatar deuce
Browse files

Remove waits in the services_thread() main loop.

These waits could cause "bad" traffic (blocked, max client exceeded, etc)
to prevent/delay accept()ing "good" traffic on other services.
parent 5f18c26f
No related branches found
No related tags found
No related merge requests found
...@@ -2099,7 +2099,6 @@ void DLLCALL services_thread(void* arg) ...@@ -2099,7 +2099,6 @@ void DLLCALL services_thread(void* arg)
if(service[i].max_clients && service[i].clients+1>service[i].max_clients) { if(service[i].max_clients && service[i].clients+1>service[i].max_clients) {
lprintf(LOG_WARNING,"%04d !%s MAXIMUM CLIENTS (%u) reached, access denied" lprintf(LOG_WARNING,"%04d !%s MAXIMUM CLIENTS (%u) reached, access denied"
,client_socket, service[i].protocol, service[i].max_clients); ,client_socket, service[i].protocol, service[i].max_clients);
mswait(3000);
close_socket(client_socket); close_socket(client_socket);
continue; continue;
} }
...@@ -2115,7 +2114,6 @@ void DLLCALL services_thread(void* arg) ...@@ -2115,7 +2114,6 @@ void DLLCALL services_thread(void* arg)
lprintf(LOG_NOTICE,"%04d !%s CLIENT BLOCKED in ip.can: %s" lprintf(LOG_NOTICE,"%04d !%s CLIENT BLOCKED in ip.can: %s"
,client_socket, service[i].protocol, host_ip); ,client_socket, service[i].protocol, host_ip);
FREE_AND_NULL(udp_buf); FREE_AND_NULL(udp_buf);
mswait(3000);
close_socket(client_socket); close_socket(client_socket);
continue; continue;
} }
...@@ -2130,7 +2128,6 @@ void DLLCALL services_thread(void* arg) ...@@ -2130,7 +2128,6 @@ void DLLCALL services_thread(void* arg)
FREE_AND_NULL(udp_buf); FREE_AND_NULL(udp_buf);
lprintf(LOG_CRIT,"%04d !%s ERROR allocating %u bytes of memory for service_client" lprintf(LOG_CRIT,"%04d !%s ERROR allocating %u bytes of memory for service_client"
,client_socket, service[i].protocol, sizeof(service_client_t)); ,client_socket, service[i].protocol, sizeof(service_client_t));
mswait(3000);
close_socket(client_socket); close_socket(client_socket);
continue; continue;
} }
......
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