From bcc2baa94a501d6cd774f7361135c028db0f9347 Mon Sep 17 00:00:00 2001 From: Seva Date: Fri, 28 Jun 2019 15:28:12 -0400 Subject: [PATCH] http: ensure http_parser on_message_complete cb is always called --- src/http.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/http.cpp b/src/http.cpp index 2f115b9c..afc10d1a 100644 --- a/src/http.cpp +++ b/src/http.cpp @@ -151,6 +151,8 @@ void Client::close_connection(const uint16_t conn_id) { auto &req = requests_[conn_id]; + // ensure on_message_complete is fired + http_parser_execute(req.parser.get(), req.parser_settings.get(), "", 0); // close the socket req.connection->close(); // remove from active requests