From 6885761f87f4378260331427a4d6f8fe61408fcc Mon Sep 17 00:00:00 2001 From: orignal Date: Thu, 8 Sep 2016 10:56:22 -0400 Subject: [PATCH] check if sessions list is empty --- Datagram.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Datagram.cpp b/Datagram.cpp index 53b13d50..b9188864 100644 --- a/Datagram.cpp +++ b/Datagram.cpp @@ -118,6 +118,7 @@ namespace datagram void DatagramDestination::CleanUp () { + if (m_Sessions.empty ()) return; auto now = i2p::util::GetMillisecondsSinceEpoch(); LogPrint(eLogDebug, "DatagramDestination: clean up sessions"); std::lock_guard lock(m_SessionsMutex);