Fixes to chunked support when pipelining

This commit is contained in:
cpq committed 2022-08-05 19:18:06 +01:00
1 parent 4bee440a56
commit 779c825e92
7 files changed
+208 -163

No files matched your search

+5
View File
@@ -650,8 +650,13 @@ void mg_mgr_poll(struct mg_mgr *mgr, int ms) {
mg_timer_poll(&mgr->timers, now);
for (c = mgr->conns; c != NULL; c = tmp) {
bool is_resp = c->is_resp;
tmp = c->next;
mg_call(c, MG_EV_POLL, &now);
if (is_resp && !c->is_resp) {
struct mg_str fake = mg_str_n("", 0);
mg_call(c, MG_EV_READ, &fake);
}
MG_VERBOSE(("%lu %c%c %c%c%c%c%c", c->id, c->is_readable ? 'r' : '-',
c->is_writable ? 'w' : '-', c->is_tls ? 'T' : 't',
c->is_connecting ? 'C' : 'c', c->is_tls_hs ? 'H' : 'h',