Ensure that user sees all the data before connection is closed

If user throttles receive by setting recv_mbuf_limit,
after the net interface reports connection as closed we must wait
for data to trickle through before disposing of it.
There can still b data in the buffers (e.g. SSL).

CL: mg: Ensure that user sees all the data before connection is closed

PUBLISHED_FROM=22be0fa368950a9fdb03cfb00febc7c0a1674b01
This commit is contained in:
Deomid Ryabkov authored and Cesanta Bot committed 2018-12-10 21:04:49 +00:00
1 parent c198d2e5f1
commit e2dfac946d
6 files changed
+47 -8

No files matched your search

@@ -67,7 +67,6 @@ void mg_ev_mgr_lwip_process_signals(struct mg_mgr *mgr) {
break;
}
case MG_SIG_CLOSE_CONN: {
nc->flags |= MG_F_SEND_AND_CLOSE;
mg_close_conn(nc);
break;
}