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
pull/326/head
moneromooo-monero 5 years ago
parent d0d76f771a
commit 1b91bebd2e
No known key found for this signature in database
GPG Key ID: 686F07454D6CEFC3

@ -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…
Cancel
Save