abstract_tcp_server2: fix lingering connections

Resetting the timer after shutdown was initiated would keep
a reference to the object inside ASIO, which would keep the
connection alive until the timer timed out
This commit is contained in:
moneromooo-monero
2019-09-12 11:27:47 +00:00
parent d0d76f771a
commit 1b91bebd2e

View File

@@ -736,6 +736,11 @@ PRAGMA_WARNING_DISABLE_VS(4355)
MERROR("Resetting timer on a dead object");
return;
}
if (m_was_shutdown)
{
MERROR("Setting timer on a shut down object");
return;
}
if (add)
ms += m_timer.expires_from_now();
m_timer.expires_from_now(ms);