mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-24 06:04:16 +00:00
fixed possible crash at shutdown
This commit is contained in:
parent
36939898fe
commit
7497741846
@ -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 ();
|
||||
}
|
||||
|
||||
|
@ -296,6 +296,8 @@ namespace tunnel
|
||||
|
||||
bool m_IsRunning;
|
||||
std::thread * m_Thread;
|
||||
i2p::util::MemoryPoolMt<I2NPMessageBuffer<I2NP_TUNNEL_ENPOINT_MESSAGE_SIZE> > m_I2NPTunnelEndpointMessagesMemoryPool;
|
||||
i2p::util::MemoryPoolMt<I2NPMessageBuffer<I2NP_TUNNEL_MESSAGE_SIZE> > m_I2NPTunnelMessagesMemoryPool;
|
||||
std::map<uint32_t, std::shared_ptr<InboundTunnel> > m_PendingInboundTunnels; // by replyMsgID
|
||||
std::map<uint32_t, std::shared_ptr<OutboundTunnel> > m_PendingOutboundTunnels; // by replyMsgID
|
||||
std::list<std::shared_ptr<InboundTunnel> > m_InboundTunnels;
|
||||
@ -306,8 +308,6 @@ namespace tunnel
|
||||
std::list<std::shared_ptr<TunnelPool>> m_Pools;
|
||||
std::shared_ptr<TunnelPool> m_ExploratoryPool;
|
||||
i2p::util::Queue<std::shared_ptr<I2NPMessage> > m_Queue;
|
||||
i2p::util::MemoryPoolMt<I2NPMessageBuffer<I2NP_TUNNEL_ENPOINT_MESSAGE_SIZE> > m_I2NPTunnelEndpointMessagesMemoryPool;
|
||||
i2p::util::MemoryPoolMt<I2NPMessageBuffer<I2NP_TUNNEL_MESSAGE_SIZE> > m_I2NPTunnelMessagesMemoryPool;
|
||||
uint32_t m_MaxNumTransitTunnels;
|
||||
// count of tunnels for total TCSR algorithm
|
||||
int m_TotalNumSuccesiveTunnelCreations, m_TotalNumFailedTunnelCreations;
|
||||
|
Loading…
x
Reference in New Issue
Block a user