aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2017-03-27 03:40:24 +0200
committerKim Alvefur <zash@zash.se>2017-03-27 03:40:24 +0200
commit604b2b4af3ea743d3394977f8f43ab6fffdb0c1e (patch)
tree637cafe8643560490982a715b1008ffacbd86637 /net
parent6b9f928da5595d57d194318e433fa600ad337264 (diff)
downloadprosody-604b2b4af3ea743d3394977f8f43ab6fffdb0c1e.tar.gz
prosody-604b2b4af3ea743d3394977f8f43ab6fffdb0c1e.zip
net.server_epoll: Log if there's a connection without listeners
Diffstat (limited to 'net')
-rw-r--r--net/server_epoll.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/server_epoll.lua b/net/server_epoll.lua
index 680c16d5..38620a21 100644
--- a/net/server_epoll.lua
+++ b/net/server_epoll.lua
@@ -143,6 +143,10 @@ end
-- Call a listener callback
function interface:on(what, ...)
+ if not self.listeners then
+ log("error", "%s has no listeners", self);
+ return;
+ end
local listener = self.listeners["on"..what];
if not listener then
-- log("debug", "Missing listener 'on%s'", what); -- uncomment for development and debugging