Tidy up calls to post()

This commit is contained in:
Vinnie Falco
2018-03-04 13:19:17 -08:00
parent 2fd3e46b20
commit 5eaa2be85e
11 changed files with 37 additions and 50 deletions
+6 -5
View File
@@ -321,8 +321,7 @@ operator()(
// Resume
BOOST_ASIO_CORO_YIELD
boost::asio::post(
ws_.get_executor(), std::move(*this));
boost::asio::post(std::move(*this));
BOOST_ASSERT(ws_.wr_block_.is_locked(this));
// Make sure the stream is open
@@ -569,9 +568,11 @@ operator()(
ws_.paused_rd_.maybe_invoke() ||
ws_.paused_ping_.maybe_invoke();
if(! cont_)
return boost::asio::post(
ws_.stream_.get_executor(),
bind_handler(std::move(h_), ec, bytes_transferred_));
{
BOOST_ASIO_CORO_YIELD
boost::asio::post(
bind_handler(std::move(*this), ec));
}
h_(ec, bytes_transferred_);
}
}