fix: address all 7 review issues
CI / lint (pull_request) Failing after 3s
CI / build-and-test (pull_request) Has been skipped
CI / sanitizers (address) (pull_request) Has been skipped
CI / sanitizers (undefined) (pull_request) Has been skipped
CI / fuzz-build (pull_request) Has been skipped
CI / coverage (pull_request) Has been skipped
CI / valgrind (pull_request) Has been skipped

This commit is contained in:
2026-07-21 18:06:48 +02:00
parent 415adf2077
commit a70ce5c4af
294 changed files with 23333 additions and 11 deletions
+2 -2
View File
@@ -12,7 +12,7 @@
#include <sys/wait.h>
#include <unistd.h>
static volatile unsigned int g_active_connections = 0;
static volatile sig_atomic_t g_active_connections = 0;
static void sigchld_handler(int sig) {
(void)sig;
@@ -92,7 +92,7 @@ static void accept_loop(Server* server, void (*child_fn)(int, void*), void* chil
perror("Could not accept the connection");
continue;
}
if (g_active_connections >= server->max_connections) {
if ((unsigned int)g_active_connections >= server->max_connections) {
log_message(LOG_LEVEL_WARNING, "Max connections (%u) reached, rejecting",
server->max_connections);
close(fd);