From 932db900c3d349a9dd05f1547063b48040190180 Mon Sep 17 00:00:00 2001 From: Richard Hodges Date: Wed, 26 Aug 2020 14:32:42 +0200 Subject: [PATCH] Add handler tracking locations to flat_stream --- CHANGELOG.md | 1 + include/boost/beast/core/impl/flat_stream.hpp | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0c113857..0438e7f5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ Version XXX: +* Add handler tracking locations to flat_stream. * Add handler tracking locations to detect_ssl. * Add handler tracking locations to icy_stream. * Add handler tracking locations to basic_stream. diff --git a/include/boost/beast/core/impl/flat_stream.hpp b/include/boost/beast/core/impl/flat_stream.hpp index 4551a59e..11c75c4c 100644 --- a/include/boost/beast/core/impl/flat_stream.hpp +++ b/include/boost/beast/core/impl/flat_stream.hpp @@ -51,6 +51,11 @@ public: s.buffer_.commit(net::buffer_copy( s.buffer_.prepare(result.size), b, result.size)); + + BOOST_ASIO_HANDLER_LOCATION(( + __FILE__, __LINE__, + "flat_stream::async_write_some")); + s.stream_.async_write_some( s.buffer_.data(), std::move(*this)); } @@ -58,6 +63,11 @@ public: { s.buffer_.clear(); s.buffer_.shrink_to_fit(); + + BOOST_ASIO_HANDLER_LOCATION(( + __FILE__, __LINE__, + "flat_stream::async_write_some")); + s.stream_.async_write_some( beast::buffers_prefix( result.size, b), std::move(*this));