From 0b96be01443ff79db8b6e2984f591ffd871599e7 Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Fri, 24 Apr 2015 14:12:29 +1000 Subject: [PATCH] Use non blocking receive in parse_client_msg as we check for read readiness with wait_read_select first, and there is the unlikely event the state changes --- src/connector.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/connector.c b/src/connector.c index 7b930ea2..b141f205 100644 --- a/src/connector.c +++ b/src/connector.c @@ -333,7 +333,7 @@ retry: return; } buflen = PAGESIZE - client->bufofs; - ret = recv(client->fd, client->buf + client->bufofs, buflen, 0); + ret = recv(client->fd, client->buf + client->bufofs, buflen, MSG_DONTWAIT); if (ret < 1) { /* We should have something to read if called since poll set * this fd's revents status so if there's nothing it means the