diff --git a/td/telegram/net/SessionMultiProxy.cpp b/td/telegram/net/SessionMultiProxy.cpp index a2de3d30..0b0d452f 100644 --- a/td/telegram/net/SessionMultiProxy.cpp +++ b/td/telegram/net/SessionMultiProxy.cpp @@ -117,8 +117,7 @@ void SessionMultiProxy::init() { string name = PSTRING() << "Session" << get_name().substr(Slice("SessionMulti").size()) << format::cond(session_count_ > 1, format::concat("#", i)); sessions_.push_back(create_actor(name, auth_data_, is_main_, allow_media_only_, is_media_, - get_pfs_flag(), is_main_ && i != 0, is_cdn_, - need_destroy_auth_key_ && i == 0)); + get_pfs_flag(), is_cdn_, need_destroy_auth_key_ && i == 0)); } } diff --git a/td/telegram/net/SessionProxy.cpp b/td/telegram/net/SessionProxy.cpp index 3448544a..010f3d28 100644 --- a/td/telegram/net/SessionProxy.cpp +++ b/td/telegram/net/SessionProxy.cpp @@ -63,13 +63,12 @@ class SessionCallback : public Session::Callback { }; SessionProxy::SessionProxy(std::shared_ptr shared_auth_data, bool is_main, bool allow_media_only, - bool is_media, bool use_pfs, bool need_wait_for_key, bool is_cdn, bool need_destroy) + bool is_media, bool use_pfs, bool is_cdn, bool need_destroy) : auth_data_(std::move(shared_auth_data)) , is_main_(is_main) , allow_media_only_(allow_media_only) , is_media_(is_media) , use_pfs_(use_pfs) - , need_wait_for_key_(need_wait_for_key) , is_cdn_(is_cdn) , need_destroy_(need_destroy) { } diff --git a/td/telegram/net/SessionProxy.h b/td/telegram/net/SessionProxy.h index 40e97e55..c7063aea 100644 --- a/td/telegram/net/SessionProxy.h +++ b/td/telegram/net/SessionProxy.h @@ -22,7 +22,7 @@ class SessionProxy : public Actor { friend class SessionCallback; SessionProxy(std::shared_ptr shared_auth_data, bool is_main, bool allow_media_only, bool is_media, - bool use_pfs, bool need_wait_for_key, bool is_cdn, bool need_destroy); + bool use_pfs, bool is_cdn, bool need_destroy); void send(NetQueryPtr query); void update_main_flag(bool is_main); @@ -38,7 +38,6 @@ class SessionProxy : public Actor { bool use_pfs_; mtproto::AuthKey tmp_auth_key_; std::vector server_salts_; - bool need_wait_for_key_; bool is_cdn_; bool need_destroy_; ActorOwn session_;