mirror of
https://github.com/badaix/snapcast.git
synced 2025-05-17 11:06:16 +02:00
Update aixlog to v1.2.5
This commit is contained in:
parent
cd9f785425
commit
52af69618c
2 changed files with 9 additions and 3 deletions
|
@ -17,9 +17,13 @@
|
|||
***/
|
||||
|
||||
#include "watchdog.hpp"
|
||||
#include "common/aixlog.hpp"
|
||||
#include <chrono>
|
||||
|
||||
|
||||
static constexpr auto LOG_TAG = "Watchdog";
|
||||
|
||||
|
||||
using namespace std;
|
||||
|
||||
namespace streamreader
|
||||
|
@ -38,6 +42,7 @@ Watchdog::~Watchdog()
|
|||
|
||||
void Watchdog::start(const std::chrono::milliseconds& timeout)
|
||||
{
|
||||
LOG(INFO, LOG_TAG) << "Starting watchdog, timeout: " << std::chrono::duration_cast<std::chrono::seconds>(timeout).count() << "s\n";
|
||||
timeout_ms_ = timeout;
|
||||
trigger();
|
||||
}
|
||||
|
@ -56,6 +61,7 @@ void Watchdog::trigger()
|
|||
timer_.async_wait([this](const boost::system::error_code& ec) {
|
||||
if (!ec)
|
||||
{
|
||||
LOG(INFO, LOG_TAG) << "Timed out: " << std::chrono::duration_cast<std::chrono::seconds>(timeout_ms_).count() << "s\n";
|
||||
listener_->onTimeout(*this, timeout_ms_);
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue