aboutsummaryrefslogtreecommitdiff
path: root/contrib/epee/include/net/abstract_tcp_server2.inl
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2018-07-03 15:24:01 +0200
committerRiccardo Spagni <ric@spagni.net>2018-07-03 15:24:01 +0200
commitc58758a0160dde62cfac28ec9f7e52648df1b58b (patch)
tree333a61654447318265782806881902a5da990e60 /contrib/epee/include/net/abstract_tcp_server2.inl
parentMerge pull request #4043 (diff)
parentabstract_tcp_server2: fix use after free (diff)
downloadmonero-c58758a0160dde62cfac28ec9f7e52648df1b58b.tar.xz
Merge pull request #4080
dead780f abstract_tcp_server2: fix use after free (moneromooo-monero)
Diffstat (limited to 'contrib/epee/include/net/abstract_tcp_server2.inl')
-rw-r--r--contrib/epee/include/net/abstract_tcp_server2.inl4
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/epee/include/net/abstract_tcp_server2.inl b/contrib/epee/include/net/abstract_tcp_server2.inl
index 7f80efb08..5b3550005 100644
--- a/contrib/epee/include/net/abstract_tcp_server2.inl
+++ b/contrib/epee/include/net/abstract_tcp_server2.inl
@@ -653,13 +653,13 @@ PRAGMA_WARNING_DISABLE_VS(4355)
m_timer.cancel();
boost::system::error_code 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())
{
try { host_count(m_host, -1); } catch (...) { /* ignore */ }
m_host = "";
}
+ m_was_shutdown = true;
+ m_protocol_handler.release_protocol();
return true;
}
//---------------------------------------------------------------------------------