mirror of
https://github.com/tdlight-team/tdlight-telegram-bot-api.git
synced 2025-01-23 10:17:32 +01:00
Make watchdog timeouts more precise.
This commit is contained in:
parent
8b2b62bd6f
commit
89383695ed
@ -531,7 +531,7 @@ void ClientManager::raw_event(const td::Event::Raw &event) {
|
||||
|
||||
void ClientManager::timeout_expired() {
|
||||
send_closure(watchdog_id_, &Watchdog::kick);
|
||||
set_timeout_in(WATCHDOG_TIMEOUT / 2);
|
||||
set_timeout_in(WATCHDOG_TIMEOUT / 10);
|
||||
|
||||
double now = td::Time::now();
|
||||
if (now > next_tqueue_gc_time_) {
|
||||
|
@ -562,7 +562,7 @@ int main(int argc, char *argv[]) {
|
||||
if (now >= start_time + 600) {
|
||||
auto guard = sched.get_main_guard();
|
||||
send_closure(watchdog_id, &Watchdog::kick);
|
||||
next_watchdog_kick_time = now + WATCHDOG_TIMEOUT / 2;
|
||||
next_watchdog_kick_time = now + WATCHDOG_TIMEOUT / 10;
|
||||
}
|
||||
|
||||
if (!need_dump_statistics.test_and_set() || now > last_dump_time + 300.0) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user