aboutsummaryrefslogtreecommitdiffstats
path: root/net/server_epoll.lua
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
commit0c848042bf5dc17287d8393ac058c5a634339dc0 (patch)
treefe4e42933631f648edd158898d5889970dc13da5 /net/server_epoll.lua
parent871fe5d529ef1c5948baa4616a3c83c4ae013f28 (diff)
downloadprosody-0c848042bf5dc17287d8393ac058c5a634339dc0.tar.gz
prosody-0c848042bf5dc17287d8393ac058c5a634339dc0.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.
Diffstat (limited to 'net/server_epoll.lua')
-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;