Boost logo

Boost :

From: Carlo Medas (carlomedas_at_[hidden])
Date: 2008-05-09 10:02:22

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:

> m_sslSocket.async_shutdown(boost::bind(&TestClient::handle_sslshutdown,
this, boost::asio::placeholders::error));

> void TestClient::handle_sslshutdown(const boost::system::error_code&
> {
> std::cout << "SSL shutdown completed with error
> 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

Thanks in advance and best regards,

Carlo Medas

Boost list run by bdawes at, gregod at, cpdaniel at, john at