mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
fixed races condition with pending outgoing sessions
This commit is contained in:
parent
eb0ef80a17
commit
629c718527
2 changed files with 9 additions and 0 deletions
|
@ -10,6 +10,7 @@
|
|||
#define SSU2_H__
|
||||
|
||||
#include <unordered_map>
|
||||
#include <mutex>
|
||||
#include "util.h"
|
||||
#include "SSU2Session.h"
|
||||
|
||||
|
@ -140,6 +141,7 @@ namespace transport
|
|||
std::unordered_map<uint64_t, std::shared_ptr<SSU2Session> > m_Sessions;
|
||||
std::unordered_map<i2p::data::IdentHash, std::shared_ptr<SSU2Session> > m_SessionsByRouterHash;
|
||||
std::map<boost::asio::ip::udp::endpoint, std::shared_ptr<SSU2Session> > m_PendingOutgoingSessions;
|
||||
mutable std::mutex m_PendingOutgoingSessionsMutex;
|
||||
std::map<boost::asio::ip::udp::endpoint, std::pair<uint64_t, uint32_t> > m_IncomingTokens, m_OutgoingTokens; // remote endpoint -> (token, expires in seconds)
|
||||
std::map<uint32_t, std::shared_ptr<SSU2Session> > m_Relays; // we are introducer, relay tag -> session
|
||||
std::list<i2p::data::IdentHash> m_Introducers, m_IntroducersV6; // introducers we are connected to
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue