Skip to content
Snippets Groups Projects
Commit 2dc32fab authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Don't query the active_clients count twice in a row

parent 354b2c11
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
......@@ -2392,7 +2392,7 @@ static void js_add_request_property(http_session_t * session, char *key, char *v
js_str=JS_NewStringCopyN(session->js_cx, value, len);
else
js_str=JS_NewStringCopyZ(session->js_cx, value);
if(js_str == NULL)
return;
......@@ -7328,7 +7328,7 @@ void web_server(void* arg)
lprintf(LOG_NOTICE, "%04d New active client highwater mark: %lu"
,client_socket, client_highwater);
}
if(startup->max_clients && protected_uint32_value(active_clients)>=startup->max_clients) {
if(startup->max_clients && count>=startup->max_clients) {
lprintf(LOG_WARNING,"%04d [%s] !MAXIMUM CLIENTS (%d) reached, access denied"
,client_socket, host_ip, startup->max_clients);
if (!len_503)
......
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