Browse Source

Drop messages going to dead proxies.

master
Con Kolivas 8 years ago
parent
commit
891faa0b93
  1. 6
      src/generator.c

6
src/generator.c

@ -1582,6 +1582,12 @@ static void send_json_msgq(gdata_t *gdata, cs_msg_t **csmsgq)
while (csmsg->len) {
int fd;
if (unlikely(!proxy->alive)) {
LOGDEBUG("Dropping send message to dead proxy %d:%d in send_json_msgq",
proxy->id, proxy->subid);
csmsg->len = 0;
break;
}
proxy->sending = csmsg;
fd = proxy->cs.fd;
ret = send(fd, csmsg->buf + csmsg->ofs, csmsg->len, MSG_DONTWAIT);

Loading…
Cancel
Save