mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-26 14:05:51 +00:00
In AutoSocket::async_shutdown, pass the error code to the handler, don't throw it.
This commit is contained in:
@@ -128,9 +128,17 @@ public:
|
|||||||
if (isSecure ())
|
if (isSecure ())
|
||||||
mSocket->async_shutdown (handler);
|
mSocket->async_shutdown (handler);
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
error_code ec;
|
||||||
|
try
|
||||||
{
|
{
|
||||||
lowest_layer ().shutdown (plain_socket::shutdown_both);
|
lowest_layer ().shutdown (plain_socket::shutdown_both);
|
||||||
mSocket->get_io_service ().post (boost::bind (handler, error_code ()));
|
}
|
||||||
|
catch (boost::system::system_error& e)
|
||||||
|
{
|
||||||
|
ec = e.code();
|
||||||
|
}
|
||||||
|
mSocket->get_io_service ().post (boost::bind (handler, ec));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user