tunnels reload changes: fix tcp tunnels reload

Signed-off-by: R4SAS <r4sas@i2pmail.org>
This commit is contained in:
R4SAS 2021-09-03 23:25:47 +03:00
parent 349022ae42
commit 6b1ef6e1b9
No known key found for this signature in database
GPG key ID: 66F6C87B98EBCFE2
4 changed files with 100 additions and 55 deletions

View file

@ -254,6 +254,10 @@ namespace client
std::vector<UDPSessionPtr> m_Sessions;
std::shared_ptr<i2p::client::ClientDestination> m_LocalDest;
UDPSessionPtr m_LastSession;
public:
bool isUpdated; // transient, used during reload only
};
class I2PUDPClientTunnel
@ -283,7 +287,7 @@ namespace client
void TryResolving();
private:
const std::string m_Name;
std::mutex m_SessionsMutex;
std::unordered_map<uint16_t, std::shared_ptr<UDPConvo> > m_Sessions; // maps i2p port -> local udp convo
@ -298,6 +302,10 @@ namespace client
uint16_t RemotePort, m_LastPort;
bool m_cancel_resolve;
std::shared_ptr<UDPConvo> m_LastSession;
public:
bool isUpdated; // transient, used during reload only
};
class I2PServerTunnel: public I2PService