mirror of
https://github.com/PaiGramTeam/telegram-bot-api.git
synced 2024-11-26 18:18:27 +00:00
Don't dump trace on Watchdog timeouts if log is disabled.
This commit is contained in:
parent
df53cfeb85
commit
0e5673f2dc
@ -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…
Reference in New Issue
Block a user