Switch from deadline_timer to steady_timer

This commit is contained in:
badaix 2019-12-05 23:01:18 +01:00
parent 6c819b8f0c
commit 210ab80f71
6 changed files with 10 additions and 10 deletions

View file

@ -97,7 +97,7 @@ void TcpStream::connect()
else
{
LOG(DEBUG) << "Connect failed: " << ec.message() << "\n";
reconnect_timer_.expires_from_now(boost::posix_time::milliseconds(1000));
reconnect_timer_.expires_after(std::chrono::milliseconds(1000));
reconnect_timer_.async_wait([self, this](const boost::system::error_code& ec) {
if (!ec)
connect();