aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2020-06-29 17:13:05 +0200
committerKim Alvefur <zash@zash.se>2020-06-29 17:13:05 +0200
commitee10afcfabfce801deb7b07882674264f3892390 (patch)
treefe4e42933631f648edd158898d5889970dc13da5
parent927ef9f2f233b616d66e736dc19cd7e4d62dfcc7 (diff)
downloadprosody-ee10afcfabfce801deb7b07882674264f3892390.tar.gz
prosody-ee10afcfabfce801deb7b07882674264f3892390.zip
net.server_epoll: Signal API-compatibilty with util.timer
Reduces the overhead of having both util.timer and the timer handling here, since they are very similar and now API-compatible.
-rw-r--r--net/server_epoll.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/net/server_epoll.lua b/net/server_epoll.lua
index fbe11401..b7a11e8b 100644
--- a/net/server_epoll.lua
+++ b/net/server_epoll.lua
@@ -896,6 +896,12 @@ return {
addserver = addserver;
addclient = addclient;
add_task = addtimer;
+ timer = {
+ -- API-compatible with util.timer
+ add_task = addtimer;
+ stop = closetimer;
+ reschedule = reschedule;
+ };
listen = listen;
loop = loop;
closeall = closeall;