mirror of
https://github.com/monero-project/monero.git
synced 2024-11-17 00:07:38 +00:00
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:
parent
d0d76f771a
commit
1b91bebd2e
1 changed files with 5 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue