diff options
| author | fusion32 <marcopuzziello@gmail.com> | 2025-12-23 23:06:37 -0300 |
|---|---|---|
| committer | fusion32 <marcopuzziello@gmail.com> | 2025-12-23 23:06:37 -0300 |
| commit | 3283d9343dd561cd576c02a99947bc11a07af558 (patch) | |
| tree | 9b0443398da3fd544c5a2b1b5d77d961c1456655 /src | |
| parent | fedf1e954a21f3aae6d7ffc618c8405aff85a136 (diff) | |
| download | login-3283d9343dd561cd576c02a99947bc11a07af558.tar.gz login-3283d9343dd561cd576c02a99947bc11a07af558.zip | |
fix poll timeout
A small mistake that caused the polling timeout to be 1 millisecond
rather than a second, increasing the CPU usage unnecessarily.
Diffstat (limited to 'src')
| -rw-r--r-- | src/connections.cc | 2 |
1 files changed, 1 insertions, 1 deletions
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", |
