diff --git a/websocketpp/transport/asio/security/tls.hpp b/websocketpp/transport/asio/security/tls.hpp index b35df0e2e3..946c49c2de 100644 --- a/websocketpp/transport/asio/security/tls.hpp +++ b/websocketpp/transport/asio/security/tls.hpp @@ -291,11 +291,19 @@ protected: callback(lib::error_code()); } + void handle_shutdown(socket_ptr s, const boost::system::error_code& ec) { + // TODO: error handling? + } + void shutdown() { - boost::system::error_code ec; - m_socket->shutdown(ec); - - // TODO: error handling + m_socket->async_shutdown( + lib::bind( + &type::handle_shutdown, + this, + m_socket, + lib::placeholders::_1 + ) + ); } private: socket_type::handshake_type get_handshake_type() {