Commit 50716511 authored by Raphael Defosseux's avatar Raphael Defosseux

feat(fqdn): better method for waiting

Signed-off-by: default avatarRaphael Defosseux <raphael.defosseux@openairinterface.org>
parent ff286868
...@@ -23,7 +23,8 @@ ...@@ -23,7 +23,8 @@
#include "logger.hpp" #include "logger.hpp"
#include <boost/asio.hpp> #include <boost/asio.hpp>
#include <iostream> #include <iostream>
#include <unistd.h> #include <chrono>
#include <thread>
#define MAX_NB_RESOLVE_TRIES 4 #define MAX_NB_RESOLVE_TRIES 4
#define TIME_BETWEEN_TRIES 2 #define TIME_BETWEEN_TRIES 2
...@@ -65,7 +66,7 @@ bool fqdn::resolve( ...@@ -65,7 +66,7 @@ bool fqdn::resolve(
std::to_string(tries) + " tries"); std::to_string(tries) + " tries");
return false; return false;
} }
sleep(TIME_BETWEEN_TRIES); std::this_thread::sleep_for(std::chrono::seconds(TIME_BETWEEN_TRIES));
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment