| 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 | { |
no test coverage detected