Changeset

9437:b202aa1e2d7b

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.
author Kim Alvefur <zash@zash.se>
date Sat, 06 Oct 2018 17:19:50 +0200
parents 9436:a950f9fa9137
children 9438:916bee81eb7e
files util-src/poll.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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) {