aboutsummaryrefslogtreecommitdiffstats
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
commite6e285898bd7dab34cf8c4c0ac5a748334f65ff0 (patch)
tree64dd61420fb88a030dd5ee4ff5968666f3e87be6
parent726a7996dd944551c5a4007872ae06dd7f3facae (diff)
downloadprosody-e6e285898bd7dab34cf8c4c0ac5a748334f65ff0.tar.gz
prosody-e6e285898bd7dab34cf8c4c0ac5a748334f65ff0.zip
net.server_epoll: Bail on callback error
An error calling a callback would be considered a truthy return value, which is not right.
-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