From 3283d9343dd561cd576c02a99947bc11a07af558 Mon Sep 17 00:00:00 2001 From: fusion32 Date: Tue, 23 Dec 2025 23:06:37 -0300 Subject: fix poll timeout A small mistake that caused the polling timeout to be 1 millisecond rather than a second, increasing the CPU usage unnecessarily. --- src/connections.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/connections.cc b/src/connections.cc index 548b073..a1111df 100644 --- a/src/connections.cc +++ b/src/connections.cc @@ -338,7 +338,7 @@ void ProcessConnections(void){ // NOTE(fusion): Block for 1 second at most, so we can properly timeout // idle connections. ASSERT(NumFds > 0); - int NumEvents = poll(Fds, NumFds, 1); + int NumEvents = poll(Fds, NumFds, 1000); if(NumEvents == -1){ if(errno != ETIMEDOUT && errno != EINTR){ LOG_ERR("Failed to poll connections: (%d) %s", -- cgit v1.2.3