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 | 74a382ebb037a90c3d849b1ae91e4244dc1ece81 (patch) | |
tree | 637cafe8643560490982a715b1008ffacbd86637 /net | |
parent | 816b44f0642d5ba90355b6683a03e64e13396ef6 (diff) | |
download | prosody-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.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 |