# HG changeset patch # User Kim Alvefur # Date 1490578824 -7200 # Node ID be374a5778f3ec41b83cda8b5ca656c38747a35a # Parent 5b5c0142fc469d0db83b15698e32dc0439074902 net.server_epoll: Log if there's a connection without listeners diff -r 5b5c0142fc46 -r be374a5778f3 net/server_epoll.lua --- a/net/server_epoll.lua Fri Mar 24 00:32:09 2017 +0100 +++ b/net/server_epoll.lua Mon Mar 27 03:40:24 2017 +0200 @@ -143,6 +143,10 @@ -- 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