aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/server_epoll.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/net/server_epoll.lua b/net/server_epoll.lua
index a6d97500..afc3f551 100644
--- a/net/server_epoll.lua
+++ b/net/server_epoll.lua
@@ -65,6 +65,11 @@ end
-- Run callbacks of expired timers
-- Return time until next timeout
local function runtimers(next_delay)
+ -- Any timers at all?
+ if not timers[1] then
+ return next_delay;
+ end
+
if resort_timers then
-- Sort earliest timers to the end
t_sort(timers, function (a, b) return a[1] > b[1]; end);