aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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