Software /
code /
prosody
Comparison
net/server_epoll.lua @ 10989:b824fe9d0c8b
net.server_epoll: Report errors in timers
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Tue, 30 Jun 2020 17:33:48 +0200 |
parent | 10987:62355b801772 |
child | 10990:03e76ad725b2 |
comparison
equal
deleted
inserted
replaced
10988:9dcbbb1d12c3 | 10989:b824fe9d0c8b |
---|---|
126 local _, timer, id = timers:pop(); | 126 local _, timer, id = timers:pop(); |
127 local ok, ret = pcall(timer, now, id); | 127 local ok, ret = pcall(timer, now, id); |
128 if ok and type(ret) == "number" then | 128 if ok and type(ret) == "number" then |
129 local next_time = elapsed+ret; | 129 local next_time = elapsed+ret; |
130 timers:insert(timer, next_time); | 130 timers:insert(timer, next_time); |
131 elseif not ok then | |
132 log("error", "Error in timer: %s", ret); | |
131 end | 133 end |
132 | 134 |
133 peek = timers:peek(); | 135 peek = timers:peek(); |
134 end | 136 end |
135 if peek == nil then | 137 if peek == nil then |