Skip to content

Commit

Permalink
Improve variant_stream async_write_some
Browse files Browse the repository at this point in the history
  • Loading branch information
Jackarain committed Sep 4, 2024
1 parent 3ca8fc2 commit 5036b2f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions proxy/include/proxy/variant_stream.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ namespace util {
auto async_write_some(const ConstBufferSequence& buffers,
WriteHandler&& handler)
{
return boost::variant2::visit([&](auto& t) mutable
return boost::variant2::visit([&, handler = std::move(handler)](auto& t) mutable
{ return t.async_write_some(buffers,
std::forward<WriteHandler>(handler)); }, *this);
std::forward<WriteHandler>(handler)); }, *this);
}

tcp::endpoint remote_endpoint()
Expand Down

0 comments on commit 5036b2f

Please sign in to comment.