36 typename CompletionToken
40 as::ssl::stream<NextLayer>& stream,
41 CompletionToken&& token
43 return as::async_compose<
55 struct async_close_impl {
56 as::ssl::stream<NextLayer>& stream;
62 template <
typename Self>
66 BOOST_ASSERT(state == shutdown);
67 auto tim = std::make_shared<as::steady_timer>(
68 stream.get_executor(),
71 auto self_sp = std::make_shared<Self>(force_move(self));
76 std::weak_ptr<as::steady_timer>(tim)
81 stream.async_shutdown(
90 template <
typename Self>
94 std::weak_ptr<as::steady_timer> wp
97 if (
auto sp = wp.lock()) {
98 ASYNC_MQTT_LOG(
"mqtt_impl",
info)
99 <<
"TLS async_shutdown timeout";
100 BOOST_ASSERT(state == shutdown);
106 ASYNC_MQTT_LOG(
"mqtt_impl",
info)
107 <<
"TLS async_shutdown timeout doesn't processed. ec:" << ec.message();
110 template <
typename Self>
115 if (state == complete) {
116 ASYNC_MQTT_LOG(
"mqtt_impl",
info)
117 <<
"TLS async_shutdown already timeout";
120 ASYNC_MQTT_LOG(
"mqtt_impl",
info)
121 <<
"TLS async_shutdown ec:" << ec.message();