socks: ignore any exceptions in shutdown/close

This commit is contained in:
selsta 2021-10-05 19:42:25 +02:00
parent 6b824c9ed0
commit 797ca974ab
No known key found for this signature in database
GPG key ID: 2EA0A99A8B07AE5E

View file

@ -321,8 +321,9 @@ namespace socks
{ {
if (self && self->proxy_.is_open()) if (self && self->proxy_.is_open())
{ {
self->proxy_.shutdown(boost::asio::ip::tcp::socket::shutdown_both); boost::system::error_code ec;
self->proxy_.close(); self->proxy_.shutdown(boost::asio::ip::tcp::socket::shutdown_both, ec);
self->proxy_.close(ec);
} }
}); });
} }