fix poll timeout

A small mistake that caused the polling timeout to be 1 millisecond
rather than a second, increasing the CPU usage unnecessarily.
This commit is contained in:
fusion32 2025-12-23 23:06:37 -03:00
parent fedf1e954a
commit 3283d9343d

View File

@ -338,7 +338,7 @@ void ProcessConnections(void){
// NOTE(fusion): Block for 1 second at most, so we can properly timeout // NOTE(fusion): Block for 1 second at most, so we can properly timeout
// idle connections. // idle connections.
ASSERT(NumFds > 0); ASSERT(NumFds > 0);
int NumEvents = poll(Fds, NumFds, 1); int NumEvents = poll(Fds, NumFds, 1000);
if(NumEvents == -1){ if(NumEvents == -1){
if(errno != ETIMEDOUT && errno != EINTR){ if(errno != ETIMEDOUT && errno != EINTR){
LOG_ERR("Failed to poll connections: (%d) %s", LOG_ERR("Failed to poll connections: (%d) %s",