Browse Source

Check for no ret after send in generator

master
Con Kolivas 10 years ago
parent
commit
2242d44b30
  1. 2
      src/generator.c

2
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",

Loading…
Cancel
Save