Don't dump trace on Watchdog timeouts if log is disabled.
This commit is contained in:
parent
372ccea547
commit
4f3842da39
1 changed files with 1 additions and 1 deletions
|
|
@ -13,7 +13,7 @@ namespace telegram_bot_api {
|
||||||
|
|
||||||
void Watchdog::kick() {
|
void Watchdog::kick() {
|
||||||
auto now = td::Time::now();
|
auto now = td::Time::now();
|
||||||
if (now >= last_kick_time_ + timeout_ && last_kick_time_ > 0) {
|
if (now >= last_kick_time_ + timeout_ && last_kick_time_ > 0 && GET_VERBOSITY_LEVEL() >= VERBOSITY_NAME(ERROR)) {
|
||||||
LOG(ERROR) << get_name() << " timeout expired after " << now - last_kick_time_ << " seconds";
|
LOG(ERROR) << get_name() << " timeout expired after " << now - last_kick_time_ << " seconds";
|
||||||
td::thread::send_real_time_signal(main_thread_id_, 2);
|
td::thread::send_real_time_signal(main_thread_id_, 2);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue