
m_sslSocket.async_shutdown(boost::bind(&TestClient::handle_sslshutdown,
Hi guys, I've question on behaviour of boost::asio::ssl::stream::async_shutdown I would expect that this should behave as any other async method of ASIO: both in case of succeed or error it should call my handler on completion. At some point in my code I call: this, boost::asio::placeholders::error));
void TestClient::handle_sslshutdown(const boost::system::error_code& error) { std::cout << "SSL shutdown completed with error <"<<error.message()<<">\n"; socket_.lowest_layer().close(); std::cout << "Lower TCP layer closed\n"; }
But it's never called on successful shutdown, it's called only if the other peer previously yet closed the connection, thus resulting in an error. So my handler is called with relative error code; in positive case, my handler is never called. What am I missing? Something here in client code or something in the server code? Thanks in advance and best regards, Carlo Medas