mirror of
https://codeberg.org/anoncontributorxmr/monero.git
synced 2024-12-23 05:37:46 +00:00
abstract_tcp_server2: fix use after free
This commit is contained in:
parent
a9b83f5a6e
commit
dead780f8a
1 changed files with 2 additions and 2 deletions
|
@ -653,13 +653,13 @@ PRAGMA_WARNING_DISABLE_VS(4355)
|
||||||
m_timer.cancel();
|
m_timer.cancel();
|
||||||
boost::system::error_code ignored_ec;
|
boost::system::error_code ignored_ec;
|
||||||
socket_.shutdown(boost::asio::ip::tcp::socket::shutdown_both, ignored_ec);
|
socket_.shutdown(boost::asio::ip::tcp::socket::shutdown_both, ignored_ec);
|
||||||
m_was_shutdown = true;
|
|
||||||
m_protocol_handler.release_protocol();
|
|
||||||
if (!m_host.empty())
|
if (!m_host.empty())
|
||||||
{
|
{
|
||||||
try { host_count(m_host, -1); } catch (...) { /* ignore */ }
|
try { host_count(m_host, -1); } catch (...) { /* ignore */ }
|
||||||
m_host = "";
|
m_host = "";
|
||||||
}
|
}
|
||||||
|
m_was_shutdown = true;
|
||||||
|
m_protocol_handler.release_protocol();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
//---------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------
|
||||||
|
|
Loading…
Reference in a new issue