util.poll: Fix monitoring of socket exceptions in select mode
authorKim Alvefur <zash@zash.se>
Sat, 06 Oct 2018 17:19:50 +0200
changeset 9440 b202aa1e2d7b
parent 9439 a950f9fa9137
child 9441 916bee81eb7e
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.
util-src/poll.c
--- a/util-src/poll.c	Sat Oct 06 16:38:05 2018 +0200
+++ b/util-src/poll.c	Sat Oct 06 17:19:50 2018 +0200
@@ -293,7 +293,7 @@
 	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) {