Save correct config expire time, but still reget config on every restart.
GitOrigin-RevId: 6aa14c424b159def6ca0ebc9dad0ddbe13010854
This commit is contained in:
parent
e2053c3239
commit
ba1c2781d8
@ -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<int>(Clocks::system() + expire_time_.in())));
|
||||
G()->td_db()->get_binlog_pmc()->set("config_expire", to_string(static_cast<int>(Clocks::system() + timestamp.in())));
|
||||
}
|
||||
|
||||
void ConfigManager::process_config(tl_object_ptr<telegram_api::config> config) {
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user