From a25dc8ab50f5d2539a5b5036cbb3309f066c5996 Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Tue, 10 Jun 2014 01:29:50 +1000 Subject: [PATCH] Don't toss out the buffer in read_socket_line if we just timed out --- src/ckpool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ckpool.c b/src/ckpool.c index 45b3c4bc..630eafa5 100644 --- a/src/ckpool.c +++ b/src/ckpool.c @@ -192,7 +192,7 @@ int read_socket_line(connsock_t *cs, int timeout) cs->buflen = cs->bufofs = 0; *eom = '\0'; out: - if (ret < 1) { + if (ret < 0) { dealloc(cs->buf); if (ret < 0 && cs->fd > 0) { close(cs->fd);