Add disable_time_adjustment_protection option.
GitOrigin-RevId: 3a23943b294e2efdabb6c8e0ff606a2c62c05573
This commit is contained in:
parent
b1ad61add3
commit
029ee5dd37
@ -161,6 +161,10 @@ void Global::save_server_time() {
|
||||
}
|
||||
|
||||
void Global::do_save_server_time_difference() {
|
||||
if (shared_config_ != nullptr && shared_config_->get_option_boolean("disable_time_adjustment_protection")) {
|
||||
return;
|
||||
}
|
||||
|
||||
// diff = server_time - Time::now
|
||||
// fixed_diff = server_time - Clocks::system
|
||||
double system_time = Clocks::system();
|
||||
|
@ -7007,6 +7007,9 @@ void Td::on_request(uint64 id, td_api::setOption &request) {
|
||||
if (set_boolean_option("disable_persistent_network_statistics")) {
|
||||
return;
|
||||
}
|
||||
if (set_boolean_option("disable_time_adjustment_protection")) {
|
||||
return;
|
||||
}
|
||||
if (request.name_ == "drop_notification_ids") {
|
||||
G()->td_db()->get_binlog_pmc()->erase("notification_id_current");
|
||||
G()->td_db()->get_binlog_pmc()->erase("notification_group_id_current");
|
||||
|
Loading…
x
Reference in New Issue
Block a user