| 214 | } |
| 215 | |
| 216 | void PingerThreadFunction() { |
| 217 | while (Running) { |
| 218 | THashSet<TNetworkAddress> requestedHosts; |
| 219 | auto collectHosts = [&requestedHosts](const TGUID&, TNetworkAddress& addr) { |
| 220 | requestedHosts.insert(addr); |
| 221 | }; |
| 222 | RequestsInfo.LockedIterateValues(collectHosts); |
| 223 | if (requestedHosts) { |
| 224 | TGUID pingGuid; |
| 225 | CreateGuid(&pingGuid); |
| 226 | PAR_DEBUG_LOG << "From " << GetHostAndPort() << "Pinging " << requestedHosts.size() << " hosts" << Endl; |
| 227 | for (const auto& addr : requestedHosts) { |
| 228 | InternalSendQuery(addr, pingGuid, "_ping_", nullptr); |
| 229 | } |
| 230 | } |
| 231 | Sleep(TDuration::Seconds(2)); |
| 232 | } |
| 233 | } |
| 234 | |
| 235 | ~TNehRequester() override { |
| 236 | Running = false; |
nothing calls this directly
no test coverage detected