mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-29 12:41:03 +00:00
Enable epoll on linux
This commit is contained in:
1 parent
4702073458
commit
51cb40acd2
8 files changed
+148
-6
No files matched your search
+4
-2
@@ -521,6 +521,8 @@ static void fcb(struct mg_connection *c, int ev, void *ev_data, void *fn_data) {
|
||||
fd->closed = 1;
|
||||
c->is_closing = 1;
|
||||
(void) c;
|
||||
} else if (ev == MG_EV_CLOSE) {
|
||||
fd->closed = 1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -545,13 +547,13 @@ static int fetch(struct mg_mgr *mgr, char *buf, const char *url,
|
||||
}
|
||||
mg_tls_init(c, &opts);
|
||||
if (c->tls == NULL) fd.closed = 1;
|
||||
// c->is_hexdumping = 1;
|
||||
}
|
||||
// c->is_hexdumping = 1;
|
||||
va_start(ap, fmt);
|
||||
mg_vprintf(c, fmt, ap);
|
||||
va_end(ap);
|
||||
buf[0] = '\0';
|
||||
for (i = 0; i < 250 && buf[0] == '\0'; i++) mg_mgr_poll(mgr, 1);
|
||||
for (i = 0; i < 50 && buf[0] == '\0'; i++) mg_mgr_poll(mgr, 1);
|
||||
if (!fd.closed) c->is_closing = 1;
|
||||
mg_mgr_poll(mgr, 1);
|
||||
return fd.code;
|
||||
|
||||
Reference in new issue
Block a user