if(! impl.wr_block.try_lock(this))
{
BOOST_ASIO_CORO_YIELD
- impl.op_close.emplace(std::move(*this));
+ {
+ BOOST_ASIO_HANDLER_LOCATION((
+ __FILE__, __LINE__,
+ "websocket::async_close"));
+
+ impl.op_close.emplace(std::move(*this));
+ }
impl.wr_block.lock(this);
BOOST_ASIO_CORO_YIELD
- net::post(std::move(*this));
+ {
+ BOOST_ASIO_HANDLER_LOCATION((
+ __FILE__, __LINE__,
+ "websocket::async_close"));
+
+ net::post(std::move(*this));
+ }
BOOST_ASSERT(impl.wr_block.is_locked(this));
}
if(impl.check_stop_now(ec))
impl.change_status(status::closing);
impl.update_timer(this->get_executor());
BOOST_ASIO_CORO_YIELD
- net::async_write(impl.stream(), fb_.data(),
- beast::detail::bind_continuation(std::move(*this)));
+ {
+ BOOST_ASIO_HANDLER_LOCATION((
+ __FILE__, __LINE__,
+ "websocket::async_close"));
+
+ net::async_write(impl.stream(), fb_.data(),
+ beast::detail::bind_continuation(std::move(*this)));
+ }
if(impl.check_stop_now(ec))
goto upcall;
if(! impl.rd_block.try_lock(this))
{
BOOST_ASIO_CORO_YIELD
- impl.op_r_close.emplace(std::move(*this));
+ {
+ BOOST_ASIO_HANDLER_LOCATION((
+ __FILE__, __LINE__,
+ "websocket::async_close"));
+
+ impl.op_r_close.emplace(std::move(*this));
+ }
impl.rd_block.lock(this);
BOOST_ASIO_CORO_YIELD
- net::post(std::move(*this));
+ {
+ BOOST_ASIO_HANDLER_LOCATION((
+ __FILE__, __LINE__,
+ "websocket::async_close"));
+
+ net::post(std::move(*this));
+ }
BOOST_ASSERT(impl.rd_block.is_locked(this));
if(impl.check_stop_now(ec))
goto upcall;
if(ev_)
goto teardown;
BOOST_ASIO_CORO_YIELD
- impl.stream().async_read_some(
- impl.rd_buf.prepare(read_size(
- impl.rd_buf, impl.rd_buf.max_size())),
- beast::detail::bind_continuation(std::move(*this)));
+ {
+ BOOST_ASIO_HANDLER_LOCATION((
+ __FILE__, __LINE__,
+ "websocket::async_close"));
+
+ impl.stream().async_read_some(
+ impl.rd_buf.prepare(read_size(
+ impl.rd_buf, impl.rd_buf.max_size())),
+ beast::detail::bind_continuation(std::move(*this)));
+ }
impl.rd_buf.commit(bytes_transferred);
if(impl.check_stop_now(ec))
goto upcall;
impl.rd_remain -= impl.rd_buf.size();
impl.rd_buf.consume(impl.rd_buf.size());
BOOST_ASIO_CORO_YIELD
- impl.stream().async_read_some(
- impl.rd_buf.prepare(read_size(
- impl.rd_buf, impl.rd_buf.max_size())),
- beast::detail::bind_continuation(std::move(*this)));
+ {
+ BOOST_ASIO_HANDLER_LOCATION((
+ __FILE__, __LINE__,
+ "websocket::async_close"));
+
+ impl.stream().async_read_some(
+ impl.rd_buf.prepare(read_size(
+ impl.rd_buf, impl.rd_buf.max_size())),
+ beast::detail::bind_continuation(std::move(*this)));
+ }
impl.rd_buf.commit(bytes_transferred);
if(impl.check_stop_now(ec))
goto upcall;
BOOST_ASSERT(impl.wr_block.is_locked(this));
using beast::websocket::async_teardown;
BOOST_ASIO_CORO_YIELD
- async_teardown(impl.role, impl.stream(),
- beast::detail::bind_continuation(std::move(*this)));
+ {
+ BOOST_ASIO_HANDLER_LOCATION((
+ __FILE__, __LINE__,
+ "websocket::async_close"));
+
+ async_teardown(impl.role, impl.stream(),
+ beast::detail::bind_continuation(std::move(*this)));
+ }
BOOST_ASSERT(impl.wr_block.is_locked(this));
if(ec == net::error::eof)
{
}
template<class NextLayer, bool deflateSupported>
-template<class CloseHandler>
+template<BOOST_BEAST_ASYNC_TPARAM1 CloseHandler>
BOOST_BEAST_ASYNC_RESULT1(CloseHandler)
stream<NextLayer, deflateSupported>::
async_close(close_reason const& cr, CloseHandler&& handler)