Wait StateManager close.
GitOrigin-RevId: 5e2b5ac122c373c23f1f21a6912056bbecadf543
This commit is contained in:
parent
62e3adf6ef
commit
8efb30d34f
@ -36,6 +36,9 @@ class StateManager final : public Actor {
|
||||
}
|
||||
};
|
||||
|
||||
StateManager(ActorShared<> parent) : parent_(std::move(parent)) {
|
||||
}
|
||||
|
||||
void on_synchronized(bool is_synchronized);
|
||||
|
||||
void on_network_updated();
|
||||
@ -92,6 +95,7 @@ class StateManager final : public Actor {
|
||||
}
|
||||
|
||||
private:
|
||||
ActorShared<> parent_;
|
||||
uint32 connect_cnt_ = 0;
|
||||
uint32 connect_proxy_cnt_ = 0;
|
||||
bool sync_flag_ = true;
|
||||
|
@ -4244,7 +4244,7 @@ void Td::init_options_and_network() {
|
||||
private:
|
||||
ActorShared<Td> td_;
|
||||
};
|
||||
state_manager_ = create_actor<StateManager>("State manager");
|
||||
state_manager_ = create_actor<StateManager>("State manager", create_reference());
|
||||
send_closure(state_manager_, &StateManager::add_callback, make_unique<StateManagerCallback>(create_reference()));
|
||||
G()->set_state_manager(state_manager_.get());
|
||||
connection_state_ = StateManager::State::Empty;
|
||||
|
Loading…
Reference in New Issue
Block a user