]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/boost/beast/websocket/impl/close.hpp
import quincy beta 17.1.0
[ceph.git] / ceph / src / boost / boost / beast / websocket / impl / close.hpp
index d59374ccd339755bb9ffd4dc098d864e59db09b9..4e42c3668c2fd1ec3bc90a0372546cfbec86490c 100644 (file)
@@ -86,10 +86,22 @@ public:
             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))
@@ -104,8 +116,14 @@ public:
             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;
 
@@ -121,10 +139,22 @@ public:
             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;
@@ -144,10 +174,16 @@ public:
                     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;
@@ -184,10 +220,16 @@ public:
                     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;
@@ -202,8 +244,14 @@ public:
             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)
             {
@@ -382,7 +430,7 @@ close(close_reason const& cr, error_code& ec)
 }
 
 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)