mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-17 10:49:47 +00:00
Refactor HTTP client
This commit is contained in:
1 parent
b0a5165b44
commit
aede72fa37
6 files changed
+42
-45
No files matched your search
+2
-4
@@ -514,13 +514,11 @@ void mg_mgr_poll(struct mg_mgr *mgr, int ms) {
|
||||
if (mg_tls_handshake(c)) c->is_tls_hs = 0;
|
||||
#endif
|
||||
} else if (c->is_connecting) {
|
||||
if (c->is_readable || c->is_writable) {
|
||||
connect_conn(c);
|
||||
}
|
||||
if (c->is_readable || c->is_writable) connect_conn(c);
|
||||
} else if (c->is_tls_hs) {
|
||||
if ((c->is_readable || c->is_writable) && mg_tls_handshake(c)) {
|
||||
c->is_tls_hs = 0;
|
||||
mg_call(c, MG_EV_CONNECT, NULL);
|
||||
if (c->is_connecting) mg_call(c, MG_EV_CONNECT, NULL);
|
||||
}
|
||||
} else {
|
||||
if (c->is_readable) read_conn(c, ll_read);
|
||||
|
||||
Reference in new issue
Block a user