MCPcopy Create free account
hub / github.com/defold/defold / PurgeExpired

Function PurgeExpired

engine/dlib/src/dlib/connection_pool.cpp:227–237  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

225 }
226
227 static void PurgeExpired(HPool pool) {
228 uint32_t n = pool->m_Connections.Size();
229
230 uint64_t now = dmTime::GetMonotonicTime();
231 for (uint32_t i = 0; i < n; ++i) {
232 Connection* c = &pool->m_Connections[i];
233 if (c->m_State == STATE_CONNECTED && now >= c->m_Expires) {
234 DoClose(pool, c);
235 }
236 }
237 }
238
239 static bool FindSlot(HPool pool, uint32_t* index, Connection** connection)
240 {

Callers 1

DoDialFunction · 0.85

Calls 3

DoCloseFunction · 0.85
GetMonotonicTimeFunction · 0.70
SizeMethod · 0.45

Tested by

no test coverage detected