aboutsummaryrefslogtreecommitdiffstats
path: root/util-src/poll.c
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2018-10-06 17:19:50 +0200
committerKim Alvefur <zash@zash.se>2018-10-06 17:19:50 +0200
commitd3c236c693ee483e876782eb9ffe6bff5057b457 (patch)
treebfdb4ecb0534271bf60457401ce030f366f404fa /util-src/poll.c
parent1e4153ffc14ac4fcc588f4d4a3749ea88c263264 (diff)
downloadprosody-d3c236c693ee483e876782eb9ffe6bff5057b457.tar.gz
prosody-d3c236c693ee483e876782eb9ffe6bff5057b457.zip
util.poll: Fix monitoring of socket exceptions in select mode
Since state->err is a set of all watched FDs, this mistake caused all sockets to appear to have errors.
Diffstat (limited to 'util-src/poll.c')
-rw-r--r--util-src/poll.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/util-src/poll.c b/util-src/poll.c
index c0a93b04..e782a44c 100644
--- a/util-src/poll.c
+++ b/util-src/poll.c
@@ -293,7 +293,7 @@ int Lwait(lua_State *L) {
tv.tv_sec = (time_t)timeout;
tv.tv_usec = ((suseconds_t)(timeout * 1000000)) % 1000000;
- ret = select(FD_SETSIZE, &state->readable, &state->writable, NULL, &tv);
+ ret = select(FD_SETSIZE, &state->readable, &state->writable, &state->err, &tv);
#endif
if(ret == 0) {