mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2026-10-23 21:32:57 +00:00
Merge pull request #2428 from freeacetone/fix-cleanup-loops
fix wrong end condition in cleanup loops
This commit is contained in:
1 file changed
+2
-2
+2
-2
@@ -1145,7 +1145,7 @@ namespace transport
|
||||
if (ecode != boost::asio::error::operation_aborted)
|
||||
{
|
||||
auto ts = i2p::util::GetSecondsSinceEpoch ();
|
||||
for (auto it = m_Relays.begin (); it != m_Relays.begin ();)
|
||||
for (auto it = m_Relays.begin (); it != m_Relays.end ();)
|
||||
{
|
||||
if (it->second.expired ())
|
||||
it = m_Relays.erase (it);
|
||||
@@ -1198,7 +1198,7 @@ namespace transport
|
||||
|
||||
{
|
||||
std::lock_guard<std::mutex> l(m_SessionsByRouterHashMutex);
|
||||
for (auto it = m_SessionsByRouterHash.begin (); it != m_SessionsByRouterHash.begin ();)
|
||||
for (auto it = m_SessionsByRouterHash.begin (); it != m_SessionsByRouterHash.end ();)
|
||||
{
|
||||
if (it->second.expired ())
|
||||
it = m_SessionsByRouterHash.erase (it);
|
||||
|
||||
Reference in new issue
Block a user