aboutsummaryrefslogtreecommitdiff
path: root/src/connections.cc
diff options
context:
space:
mode:
authorfusion32 <marcopuzziello@gmail.com>2025-12-23 23:06:37 -0300
committerfusion32 <marcopuzziello@gmail.com>2025-12-23 23:06:37 -0300
commit3283d9343dd561cd576c02a99947bc11a07af558 (patch)
tree9b0443398da3fd544c5a2b1b5d77d961c1456655 /src/connections.cc
parentfedf1e954a21f3aae6d7ffc618c8405aff85a136 (diff)
downloadlogin-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/connections.cc')
-rw-r--r--src/connections.cc2
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",