Fix GroupCallManager destructor.

This commit is contained in:
levlam 2020-11-26 18:02:18 +03:00
parent ab3e695f94
commit de6ac56cf2
3 changed files with 9 additions and 2 deletions

View File

@ -451,7 +451,7 @@ const CountryInfoManager::CountryList *CountryInfoManager::get_country_list(cons
it = countries_.find(language_code);
CHECK(it != countries_.end())
auto *country = it->second.get();
load_country_list(language_code, country->hash, {});
load_country_list(language_code, country->hash, Auto());
return country;
}
return nullptr;
@ -460,7 +460,7 @@ const CountryInfoManager::CountryList *CountryInfoManager::get_country_list(cons
auto *country = it->second.get();
CHECK(country != nullptr);
if (country->next_reload_time < Time::now()) {
load_country_list(language_code, country->hash, {});
load_country_list(language_code, country->hash, Auto());
}
return country;

View File

@ -181,6 +181,8 @@ struct GroupCallManager::PendingJoinRequest {
GroupCallManager::GroupCallManager(Td *td, ActorShared<> parent) : td_(td), parent_(std::move(parent)) {
}
GroupCallManager::~GroupCallManager() = default;
void GroupCallManager::tear_down() {
parent_.reset();
}

View File

@ -23,6 +23,11 @@ class Td;
class GroupCallManager : public Actor {
public:
GroupCallManager(Td *td, ActorShared<> parent);
GroupCallManager(const GroupCallManager &) = delete;
GroupCallManager &operator=(const GroupCallManager &) = delete;
GroupCallManager(GroupCallManager &&) = delete;
GroupCallManager &operator=(GroupCallManager &&) = delete;
~GroupCallManager() override;
void create_group_call(ChannelId channel_id, Promise<InputGroupCallId> &&promise);