Software /
code /
prosody
Comparison
net/server_epoll.lua @ 9696:ed0917381b4d
net.server_epoll: Bail on callback error
An error calling a callback would be considered a truthy return value,
which is not right.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 08 Dec 2018 21:28:48 +0100 |
parent | 9695:5ec4eaf76de8 |
child | 9823:b61ba4496923 |
comparison
equal
deleted
inserted
replaced
9695:5ec4eaf76de8 | 9696:ed0917381b4d |
---|---|
178 return; | 178 return; |
179 end | 179 end |
180 local ok, err = pcall(listener, self, ...); | 180 local ok, err = pcall(listener, self, ...); |
181 if not ok then | 181 if not ok then |
182 log("error", "Error calling on%s: %s", what, err); | 182 log("error", "Error calling on%s: %s", what, err); |
183 return; | |
183 end | 184 end |
184 return err; | 185 return err; |
185 end | 186 end |
186 | 187 |
187 -- Return the file descriptor number | 188 -- Return the file descriptor number |