Don't resave DcOptions on launch.
This commit is contained in:
parent
36e95649cc
commit
f8342527ca
@ -1033,6 +1033,10 @@ void ConnectionCreator::on_dc_options(DcOptions new_dc_options) {
|
||||
VLOG(connections) << "SAVE " << new_dc_options;
|
||||
G()->td_db()->get_binlog_pmc()->set("dc_options", serialize(new_dc_options));
|
||||
dc_options_set_.reset();
|
||||
add_dc_options(std::move(new_dc_options));
|
||||
}
|
||||
|
||||
void ConnectionCreator::add_dc_options(DcOptions &&new_dc_options) {
|
||||
dc_options_set_.add_dc_options(get_default_dc_options(G()->is_test_dc()));
|
||||
#if !TD_EMSCRIPTEN // FIXME
|
||||
dc_options_set_.add_dc_options(std::move(new_dc_options));
|
||||
@ -1091,7 +1095,7 @@ void ConnectionCreator::start_up() {
|
||||
if (status.is_error()) {
|
||||
on_dc_options(DcOptions());
|
||||
} else {
|
||||
on_dc_options(std::move(dc_options));
|
||||
add_dc_options(std::move(dc_options));
|
||||
}
|
||||
|
||||
if (G()->td_db()->get_binlog_pmc()->get("proxy_max_id") != "2" ||
|
||||
|
@ -206,7 +206,7 @@ class ConnectionCreator final : public NetQueryCallback {
|
||||
void loop() final;
|
||||
|
||||
void init_proxies();
|
||||
void save_dc_options();
|
||||
void add_dc_options(DcOptions &&new_dc_options);
|
||||
Result<SocketFd> do_request_connection(DcId dc_id, bool allow_media_only);
|
||||
Result<std::pair<unique_ptr<mtproto::RawConnection>, bool>> do_request_raw_connection(DcId dc_id,
|
||||
bool allow_media_only,
|
||||
|
Loading…
Reference in New Issue
Block a user