boost::beast::flat_buffer& buf,
boost::beast::http::parser<true, boost::beast::http::string_body>& parser,
boost::beast::http::response<boost::beast::http::string_body>& response,
+ bool& shuttingDown,
boost::asio::yield_context& yc
)
{
namespace http = boost::beast::http;
+ if (shuttingDown)
+ return false;
+
bool httpError = false;
String errorMsg;
boost::beast::http::parser<true, boost::beast::http::string_body>& parser,
ApiUser::Ptr& authenticatedUser,
boost::beast::http::response<boost::beast::http::string_body>& response,
+ bool& shuttingDown,
boost::asio::yield_context& yc
)
{
parser.body_limit(maxSize);
}
+ if (shuttingDown)
+ return false;
+
boost::system::error_code ec;
http::async_read(stream, buf, parser, yc[ec]);
// Best practice is to always reset the buffer.
buf = {};
- if (!EnsureValidHeaders(*m_Stream, buf, parser, response, yc)) {
+ if (!EnsureValidHeaders(*m_Stream, buf, parser, response, m_ShuttingDown, yc)) {
break;
}
// Best practice is to always reset the buffer.
buf = {};
- if (!EnsureValidBody(*m_Stream, buf, parser, authenticatedUser, response, yc)) {
+ if (!EnsureValidBody(*m_Stream, buf, parser, authenticatedUser, response, m_ShuttingDown, yc)) {
break;
}