mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-08-15 01:03:23 +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");
|
MERROR("Resetting timer on a dead object");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (m_was_shutdown)
|
||||||
|
{
|
||||||
|
MERROR("Setting timer on a shut down object");
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (add)
|
if (add)
|
||||||
ms += m_timer.expires_from_now();
|
ms += m_timer.expires_from_now();
|
||||||
m_timer.expires_from_now(ms);
|
m_timer.expires_from_now(ms);
|
||||||
|
|
Loading…
Reference in a new issue