mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-22 12:24:19 +00:00
correct SSU2 server termination
This commit is contained in:
parent
2cfd054f2c
commit
b918499f14
@ -82,12 +82,20 @@ namespace transport
|
|||||||
|
|
||||||
void SSU2Server::Stop ()
|
void SSU2Server::Stop ()
|
||||||
{
|
{
|
||||||
|
for (auto& it: m_Sessions)
|
||||||
|
it.second->Done ();
|
||||||
|
m_Sessions.clear ();
|
||||||
|
m_SessionsByRouterHash.clear ();
|
||||||
|
m_PendingOutgoingSessions.clear ();
|
||||||
|
|
||||||
if (context.SupportsV4 () || context.SupportsV6 ())
|
if (context.SupportsV4 () || context.SupportsV6 ())
|
||||||
m_ReceiveService.Stop ();
|
m_ReceiveService.Stop ();
|
||||||
|
|
||||||
|
m_SocketV4.close ();
|
||||||
|
m_SocketV6.close ();
|
||||||
if (IsRunning ())
|
if (IsRunning ())
|
||||||
m_TerminationTimer.cancel ();
|
m_TerminationTimer.cancel ();
|
||||||
|
|
||||||
StopIOService ();
|
StopIOService ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user