mirror of
https://github.com/PurpleI2P/i2pd
synced 2024-11-10 08:00:38 +03:00
start over if an active session got disconnected
This commit is contained in:
parent
60fd3a4542
commit
77189bf8e9
@ -647,12 +647,14 @@ namespace transport
|
||||
auto it = m_Peers.find (ident);
|
||||
if (it != m_Peers.end ())
|
||||
{
|
||||
auto before = it->second.sessions.size ();
|
||||
it->second.sessions.remove (session);
|
||||
if (it->second.sessions.empty ()) // TODO: why?
|
||||
if (it->second.sessions.empty ())
|
||||
{
|
||||
if (it->second.delayedMessages.size () > 0)
|
||||
{
|
||||
// it->second.numAttempts = 0; // TODO: recognize if connect failed
|
||||
if (before > 0) // we had an active session before
|
||||
it->second.numAttempts = 0; // start over
|
||||
ConnectToPeer (ident, it->second);
|
||||
}
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user