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
|
@ -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 New Issue