Skip to content

Commit 908fcd7

Browse files
Rustamchukru.nazarov
andauthored
Rustamchuk/fix for version (#36)
* sample prob sdk support * fix some methods for legacy versions --------- Co-authored-by: ru.nazarov <ru.nazarov@vkteam.ru>
1 parent 57a4090 commit 908fcd7

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

statshouse.hpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1122,7 +1122,9 @@ class TransportTCP : public TransportUDPBase {
11221122
void run_dns_refresh() {
11231123
while (!stop_.load()) {
11241124
std::unique_lock<std::mutex> lock{dns_mu_};
1125-
dns_cv_.wait_for(lock, std::chrono::minutes(1), [this]() { return stop_.load(); });
1125+
// Avoid wait_for to support older glibc versions without pthread_cond_clockwait.
1126+
dns_cv_.wait_until(lock, std::chrono::system_clock::now() + std::chrono::minutes(1),
1127+
[this]() { return stop_.load(); });
11261128
if (stop_.load()) {
11271129
break;
11281130
}

0 commit comments

Comments
 (0)