From de377b45b4fe5819ba81e3395f1c6ee6e73a0795 Mon Sep 17 00:00:00 2001 From: orignal Date: Sun, 20 Jul 2014 18:16:55 -0400 Subject: [PATCH] delete unreachable SSU sessions --- SSU.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/SSU.cpp b/SSU.cpp index 05802f1f..392fcf0f 100644 --- a/SSU.cpp +++ b/SSU.cpp @@ -824,6 +824,7 @@ namespace ssu // encrypt message with session key FillHeaderAndEncrypt (PAYLOAD_TYPE_SESSION_DESTROYED, buf, 48); Send (buf, 48); + LogPrint ("SSU session destoryed sent"); } } @@ -1021,7 +1022,12 @@ namespace ssu introducerSession->Introduce (introducer->iTag, introducer->iKey); } else + { LogPrint ("Router is unreachable, but no introducers presented. Ignored"); + m_Sessions.erase (remoteEndpoint); + delete session; + session = nullptr; + } } } }