diff --git a/td/telegram/ConfigManager.cpp b/td/telegram/ConfigManager.cpp index e9acf625d..1ea909cbc 100644 --- a/td/telegram/ConfigManager.cpp +++ b/td/telegram/ConfigManager.cpp @@ -885,7 +885,7 @@ void ConfigManager::start_up() { send_closure(config_recoverer_, &ConfigRecoverer::on_dc_options_update, load_dc_options_update()); auto expire_time = load_config_expire_time(); - if (expire_time.is_in_past()) { + if (expire_time.is_in_past() || true) { request_config(); } else { expire_time_ = expire_time; @@ -1316,8 +1316,7 @@ Timestamp ConfigManager::load_config_expire_time() { } void ConfigManager::save_config_expire(Timestamp timestamp) { - G()->td_db()->get_binlog_pmc()->set("config_expire", - to_string(static_cast(Clocks::system() + expire_time_.in()))); + G()->td_db()->get_binlog_pmc()->set("config_expire", to_string(static_cast(Clocks::system() + timestamp.in()))); } void ConfigManager::process_config(tl_object_ptr config) { diff --git a/td/telegram/ConfigManager.h b/td/telegram/ConfigManager.h index ad6f0255f..7a0fb413c 100644 --- a/td/telegram/ConfigManager.h +++ b/td/telegram/ConfigManager.h @@ -153,10 +153,10 @@ class ConfigManager : public NetQueryCallback { void do_dismiss_suggested_action(SuggestedAction suggested_action); - Timestamp load_config_expire_time(); - void save_config_expire(Timestamp timestamp); - void save_dc_options_update(DcOptions dc_options); - DcOptions load_dc_options_update(); + static Timestamp load_config_expire_time(); + static void save_config_expire(Timestamp timestamp); + static void save_dc_options_update(DcOptions dc_options); + static DcOptions load_dc_options_update(); }; } // namespace td