| 195 | } |
| 196 | |
| 197 | void ServerQueryThread::pruneChallenges() { |
| 198 | int64_t now = Time::monotonicMilliseconds(); |
| 199 | if (now < m_lastChallengeCheck + challengeCheckInterval) { |
| 200 | return; |
| 201 | } |
| 202 | |
| 203 | auto expire = now - challengeCheckInterval; |
| 204 | auto it = makeSMutableMapIterator(m_validChallenges); |
| 205 | while (it.hasNext()) { |
| 206 | auto const& pair = it.next(); |
| 207 | if (pair.second->before(expire)) { |
| 208 | it.remove(); |
| 209 | } |
| 210 | } |
| 211 | m_lastChallengeCheck = now; |
| 212 | } |
| 213 | |
| 214 | void ServerQueryThread::run() { |
| 215 | HostAddressWithPort udpAddress; |
nothing calls this directly
no test coverage detected