From 7b46de8d5377dcad4a03754d8f56acd4d7f1bfe8 Mon Sep 17 00:00:00 2001 From: ckolivas Date: Thu, 9 Oct 2014 11:07:07 +1100 Subject: [PATCH] Fix more thinkos --- src/connector.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/connector.c b/src/connector.c index 11472f8d..7a3bd108 100644 --- a/src/connector.c +++ b/src/connector.c @@ -280,6 +280,8 @@ void *receiver(void *arg) /* First fd is reserved for the accepting socket */ fds[0].fd = ci->serverfd; + fds[0].events = POLLIN; + fds[0].revents = 0; rebuild_fds: update = false; nfds = 1; @@ -308,7 +310,7 @@ repoll: goto out; } - for (i = 0; i < nfds || ret > 0; i++) { + for (i = 0; i < nfds && ret > 0; i++) { int fd, accepted; if (!fds[i].revents)