fixed possible crash at shutdown

This commit is contained in:
orignal committed 2024-12-18 14:22:05 -05:00
1 parent 36939898fe
commit 7497741846
2 files changed
+3 -3

No files matched your search

+1 -1
View File
@@ -1550,6 +1550,7 @@ namespace transport
void NTCP2Server::Stop ()
{
m_EstablisherService.Stop ();
{
// we have to copy it because Terminate changes m_NTCP2Sessions
auto ntcpSessions = m_NTCP2Sessions;
@@ -1565,7 +1566,6 @@ namespace transport
m_TerminationTimer.cancel ();
m_ProxyEndpoint = nullptr;
}
m_EstablisherService.Stop ();
StopIOService ();
}