mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-24 20:21:49 +00:00
Close if drained
This commit is contained in:
1 parent
f618fe125c
commit
041ec6e1f8
2 files changed
+2
No files matched your search
@@ -5361,6 +5361,7 @@ void mg_mgr_poll(struct mg_mgr *mgr, int ms) {
|
|||||||
if (s->twclosure &&
|
if (s->twclosure &&
|
||||||
(!c->is_tls || (c->rtls.len == 0 && mg_tls_pending(c) == 0)))
|
(!c->is_tls || (c->rtls.len == 0 && mg_tls_pending(c) == 0)))
|
||||||
c->is_closing = 1;
|
c->is_closing = 1;
|
||||||
|
if (c->is_draining && c->send.len == 0) c->is_closing = 1;
|
||||||
if (c->is_closing) close_conn(c);
|
if (c->is_closing) close_conn(c);
|
||||||
}
|
}
|
||||||
(void) ms;
|
(void) ms;
|
||||||
|
|||||||
@@ -1199,6 +1199,7 @@ void mg_mgr_poll(struct mg_mgr *mgr, int ms) {
|
|||||||
if (s->twclosure &&
|
if (s->twclosure &&
|
||||||
(!c->is_tls || (c->rtls.len == 0 && mg_tls_pending(c) == 0)))
|
(!c->is_tls || (c->rtls.len == 0 && mg_tls_pending(c) == 0)))
|
||||||
c->is_closing = 1;
|
c->is_closing = 1;
|
||||||
|
if (c->is_draining && c->send.len == 0) c->is_closing = 1;
|
||||||
if (c->is_closing) close_conn(c);
|
if (c->is_closing) close_conn(c);
|
||||||
}
|
}
|
||||||
(void) ms;
|
(void) ms;
|
||||||
|
|||||||
Reference in new issue
Block a user