diff options
author | Kim Alvefur <zash@zash.se> | 2017-03-27 03:40:24 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2017-03-27 03:40:24 +0200 |
commit | 604b2b4af3ea743d3394977f8f43ab6fffdb0c1e (patch) | |
tree | 637cafe8643560490982a715b1008ffacbd86637 | |
parent | 6b9f928da5595d57d194318e433fa600ad337264 (diff) | |
download | prosody-604b2b4af3ea743d3394977f8f43ab6fffdb0c1e.tar.gz prosody-604b2b4af3ea743d3394977f8f43ab6fffdb0c1e.zip |
net.server_epoll: Log if there's a connection without listeners
-rw-r--r-- | net/server_epoll.lua | 4 |
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 |