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
commit74a382ebb037a90c3d849b1ae91e4244dc1ece81 (patch)
tree637cafe8643560490982a715b1008ffacbd86637 /net
parent816b44f0642d5ba90355b6683a03e64e13396ef6 (diff)
downloadprosody-74a382ebb037a90c3d849b1ae91e4244dc1ece81.tar.gz
prosody-74a382ebb037a90c3d849b1ae91e4244dc1ece81.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