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 | 3e48ac275a76b71d12eb7a6e31efb48dcc049cd4 (patch) | |
tree | bfdb4ecb0534271bf60457401ce030f366f404fa /util-src/poll.c | |
parent | 08b5a03be3e6344ed475df7cac56a18bd7330f69 (diff) | |
download | prosody-3e48ac275a76b71d12eb7a6e31efb48dcc049cd4.tar.gz prosody-3e48ac275a76b71d12eb7a6e31efb48dcc049cd4.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.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) { |