Fix database init.

This commit is contained in:
levlam 2022-06-10 19:05:43 +03:00
parent 2171452e77
commit caf84b01b7
2 changed files with 2 additions and 0 deletions

View File

@ -3812,6 +3812,7 @@ void Td::finish_init() {
return;
}
VLOG(td_init) << "Continue to execute " << pending_init_requests_.size() << " pending requests";
auto requests = std::move(pending_init_requests_);
for (auto &request : requests) {
run_request(request.first, std::move(request.second));

View File

@ -394,6 +394,7 @@ void TdDb::open(int32 scheduler_id, TdParameters parameters, DbKey key, Promise<
public:
void open(TdParameters &&parameters, DbKey &&key, Promise<OpenedDatabase> &&promise) {
TdDb::open(-1, std::move(parameters), std::move(key), std::move(promise));
stop();
}
};
send_closure(create_actor_on_scheduler<Worker>("worker", scheduler_id), &Worker::open, std::move(parameters),