From 5146b715fcbbd445326742b27fe00b9677822837 Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Sat, 2 Jan 2016 11:05:01 +1100 Subject: [PATCH] Empty buffer on failure --- src/ckpool.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ckpool.c b/src/ckpool.c index c54b75e7..2dd7cd3e 100644 --- a/src/ckpool.c +++ b/src/ckpool.c @@ -651,6 +651,8 @@ static int read_gz_line(connsock_t *cs, float *timeout) cs->buflen = cs->bufofs = 0; out: free(dest); + if (ret < 1) + empty_buffer(cs); return ret; }