diff --git a/mongoose.c b/mongoose.c index 70692322..e6d2351e 100644 --- a/mongoose.c +++ b/mongoose.c @@ -3593,7 +3593,9 @@ static bool mg_socketpair(SOCKET sp[2], union usa usa[2]) { void mg_mgr_wakeup(struct mg_connection *c, const void *buf, size_t len) { if (buf == NULL || len == 0) buf = (void *) "", len = 1; - send((SOCKET) (size_t) c->pfn_data, (const char *) buf, len, MSG_NONBLOCKING); + if ((size_t) send((SOCKET) (size_t) c->pfn_data, (const char *) buf, len, + MSG_NONBLOCKING) != len) + (void) 0; } static void pf1(struct mg_connection *c, int ev, void *ev_data, void *fn_data) { diff --git a/src/sock.c b/src/sock.c index f3a4f291..38f510df 100644 --- a/src/sock.c +++ b/src/sock.c @@ -426,7 +426,9 @@ static bool mg_socketpair(SOCKET sp[2], union usa usa[2]) { void mg_mgr_wakeup(struct mg_connection *c, const void *buf, size_t len) { if (buf == NULL || len == 0) buf = (void *) "", len = 1; - send((SOCKET) (size_t) c->pfn_data, (const char *) buf, len, MSG_NONBLOCKING); + if ((size_t) send((SOCKET) (size_t) c->pfn_data, (const char *) buf, len, + MSG_NONBLOCKING) != len) + (void) 0; } static void pf1(struct mg_connection *c, int ev, void *ev_data, void *fn_data) {