aboutsummaryrefslogtreecommitdiff
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
commitbd267b04905b584467d396bb3d20c32306bf2a19 (patch)
tree0453d8903cfe0147188a86e02ee4af34c4bd6d29 /net
parentc461eb1cfa097064f940bd5089d901a97173b8c2 (diff)
downloadprosody-im-server-bd267b04905b584467d396bb3d20c32306bf2a19.tar
prosody-im-server-bd267b04905b584467d396bb3d20c32306bf2a19.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