Merge pull request #7996

423b655 socks: ignore any exceptions in shutdown/close (selsta)
This commit is contained in:
luigi1111 2021-10-25 18:58:20 -05:00
commit 2ac8f5b58e
No known key found for this signature in database
GPG key ID: F4ACA0183641E010

View file

@ -322,8 +322,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);
} }
}); });
} }