diff options
author | Kim Alvefur <zash@zash.se> | 2018-10-06 17:19:50 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2018-10-06 17:19:50 +0200 |
commit | d3c236c693ee483e876782eb9ffe6bff5057b457 (patch) | |
tree | bfdb4ecb0534271bf60457401ce030f366f404fa | |
parent | 1e4153ffc14ac4fcc588f4d4a3749ea88c263264 (diff) | |
download | prosody-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.
-rw-r--r-- | util-src/poll.c | 2 |
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) { |