Browse Source

start over if an active session got disconnected

pull/1441/head
orignal 5 years ago
parent
commit
77189bf8e9
  1. 6
      libi2pd/Transports.cpp

6
libi2pd/Transports.cpp

@ -647,12 +647,14 @@ namespace transport @@ -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…
Cancel
Save