From 1b3a972df22f2cc614ac819b63aa94366225ecfe Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Tue, 17 Jun 2014 23:42:39 +1000 Subject: [PATCH] Don't start receiving data till we are accepting connections in the connector --- src/connector.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/connector.c b/src/connector.c index 73ad62c3..9c5c5a68 100644 --- a/src/connector.c +++ b/src/connector.c @@ -244,6 +244,8 @@ void *receiver(void *arg) retry: nfds = 0; + while (!ci->accept) + sleep(1); ck_rlock(&ci->lock); HASH_ITER(fdhh, fdclients, client, tmp) {