mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-19 19:40:56 +00:00
Use mongoose event to free updater resources
PUBLISHED_FROM=3044287fe2623b591ddbf5c619398c21d6753411
This commit is contained in:
1 parent
63be1ebd38
commit
4927195ee4
2 files changed
+6
-5
No files matched your search
+3
-2
@@ -5072,15 +5072,16 @@ void mg_http_handler(struct mg_connection *nc, int ev, void *ev_data) {
|
||||
*/
|
||||
struct mg_http_stream_info si;
|
||||
struct mg_http_multipart_part mp;
|
||||
mg_event_handler_t handler;
|
||||
memset(&mp, 0, sizeof(mp));
|
||||
|
||||
mg_http_parse_stream_info(&pd->strm_state, &si);
|
||||
handler = mg_http_get_endpoint_handler(nc->listener, &si.endpoint);
|
||||
|
||||
mp.status = -1;
|
||||
mp.var_name = si.var_name.p;
|
||||
mp.file_name = si.file_name.p;
|
||||
mg_call(nc, pd->endpoint_handler ? pd->endpoint_handler : nc->handler,
|
||||
MG_EV_HTTP_PART_END, &mp);
|
||||
mg_call(nc, (handler ? handler : nc->handler), MG_EV_HTTP_PART_END, &mp);
|
||||
} else
|
||||
#endif
|
||||
if (io->len > 0 && mg_parse_http(io->buf, io->len, hm, is_req) > 0) {
|
||||
|
||||
Reference in new issue
Block a user