is_closing -> is_draining

This commit is contained in:
Sergio R. Caprile committed 2023-08-17 16:45:10 -03:00
1 parent 36fcb7ed21
commit 2b20af36a7
8 files changed
+11 -11

No files matched your search

+1 -1
View File
@@ -43,7 +43,7 @@ static void fn(struct mg_connection *c, int ev, void *ev_data, void *fn_data) {
// Response is received. Print it
struct mg_http_message *hm = (struct mg_http_message *) ev_data;
printf("%.*s", (int) hm->message.len, hm->message.ptr);
c->is_closing = 1; // Tell mongoose to close this connection
c->is_draining = 1; // Tell mongoose to close this connection
*(bool *) fn_data = true; // Tell event loop to stop
} else if (ev == MG_EV_ERROR) {
*(bool *) fn_data = true; // Error, tell event loop to stop