mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
fixed crash on termination
This commit is contained in:
parent
cdaa72e664
commit
81a7253e0f
2 changed files with 42 additions and 21 deletions
|
@ -135,6 +135,7 @@ namespace i2p
|
|||
{
|
||||
m_SSUServer->Stop ();
|
||||
delete m_SSUServer;
|
||||
m_SSUServer = nullptr;
|
||||
}
|
||||
|
||||
for (auto session: m_NTCPSessions)
|
||||
|
@ -149,7 +150,7 @@ namespace i2p
|
|||
{
|
||||
m_Thread->join ();
|
||||
delete m_Thread;
|
||||
m_Thread = 0;
|
||||
m_Thread = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -188,13 +189,14 @@ namespace i2p
|
|||
conn->ServerLogin ();
|
||||
}
|
||||
else
|
||||
{
|
||||
delete conn;
|
||||
}
|
||||
|
||||
conn = new i2p::ntcp::NTCPServerConnection (m_Service);
|
||||
m_NTCPAcceptor->async_accept(conn->GetSocket (), boost::bind (&Transports::HandleAccept, this,
|
||||
conn, boost::asio::placeholders::error));
|
||||
if (error != boost::asio::error::operation_aborted)
|
||||
{
|
||||
conn = new i2p::ntcp::NTCPServerConnection (m_Service);
|
||||
m_NTCPAcceptor->async_accept(conn->GetSocket (), boost::bind (&Transports::HandleAccept, this,
|
||||
conn, boost::asio::placeholders::error));
|
||||
}
|
||||
}
|
||||
|
||||
i2p::ntcp::NTCPSession * Transports::GetNextNTCPSession ()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue