From 55398684ccfcbc13b42db114ac248d9a2b4ac762 Mon Sep 17 00:00:00 2001 From: Deomid Ryabkov Date: Fri, 22 Apr 2016 16:19:46 +0300 Subject: [PATCH] Ignore "non-errors" when sending h/t @f00bard PUBLISHED_FROM=5deab05502797bb6393e8dbbd5684aba4a72a799 --- mongoose.c | 1 + 1 file changed, 1 insertion(+) diff --git a/mongoose.c b/mongoose.c index 633ac923..3e85dbac 100644 --- a/mongoose.c +++ b/mongoose.c @@ -3313,6 +3313,7 @@ static void mg_write_to_socket(struct mg_connection *nc) { { n = (int) MG_SEND_FUNC(nc->sock, io->buf, io->len, 0); DBG(("%p %d bytes -> %d", nc, n, nc->sock)); + if (n < 0 && !mg_is_error(n)) return; } if (n > 0) {