aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2018-12-08 21:28:48 +0100
committerKim Alvefur <zash@zash.se>2018-12-08 21:28:48 +0100
commit05886ceece8c11a31ca9f414332bb9fa99c15473 (patch)
tree64dd61420fb88a030dd5ee4ff5968666f3e87be6 /net
parenta575159cb0172220dd3657ed8a3eff5ca22d9532 (diff)
downloadprosody-05886ceece8c11a31ca9f414332bb9fa99c15473.tar.gz
prosody-05886ceece8c11a31ca9f414332bb9fa99c15473.zip
net.server_epoll: Bail on callback error
An error calling a callback would be considered a truthy return value, which is not right.
Diffstat (limited to 'net')
-rw-r--r--net/server_epoll.lua1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/server_epoll.lua b/net/server_epoll.lua
index 3088b55b..b2165b1d 100644
--- a/net/server_epoll.lua
+++ b/net/server_epoll.lua
@@ -180,6 +180,7 @@ function interface:on(what, ...)
local ok, err = pcall(listener, self, ...);
if not ok then
log("error", "Error calling on%s: %s", what, err);
+ return;
end
return err;
end