From 2242d44b3054fd404be6aaec08655876e2ce9cc3 Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Thu, 30 Apr 2015 09:04:19 +1000 Subject: [PATCH] Check for no ret after send in generator --- src/generator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/generator.c b/src/generator.c index 78b34d4d..e7cf6f47 100644 --- a/src/generator.c +++ b/src/generator.c @@ -1539,7 +1539,7 @@ static void send_json_msgq(gdata_t *gdata, cs_msg_t **csmsgq) ret = send(fd, csmsg->buf + csmsg->ofs, csmsg->len, MSG_DONTWAIT); if (ret < 1) { - if (errno == EAGAIN || errno == EWOULDBLOCK) + if (errno == EAGAIN || errno == EWOULDBLOCK || !ret) break; csmsg->len = 0; LOGNOTICE("Proxy %d:%d %s failed to send msg in send_json_msgq, dropping",