MCPcopy Create free account
hub / github.com/PurpleI2P/i2pd / CleanupExpiredNumConnectionsPerSecond

Method CleanupExpiredNumConnectionsPerSecond

libi2pd/Streaming.cpp:2458–2468  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2456 }
2457
2458 void StreamingDestination::CleanupExpiredNumConnectionsPerSecond (std::list<uint64_t>& numConnectionsList, uint64_t ts)
2459 {
2460 if (numConnectionsList.empty ()) return;
2461 auto it = numConnectionsList.begin ();
2462 while (it != numConnectionsList.end ())
2463 {
2464 if (*it + 60 >= ts) break; // 1 minute
2465 it++;
2466 }
2467 numConnectionsList.erase (numConnectionsList.begin (), it);
2468 }
2469}
2470}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected