Initialize reference database on cleanup

This commit is contained in:
Daniil Gentili 2020-10-06 10:44:53 +02:00
parent e5ab5cabac
commit 9511ebab38
Signed by: danog
GPG Key ID: 8C1BE3B34B230CA7
1 changed files with 1 additions and 0 deletions

View File

@ -694,6 +694,7 @@ class MTProto extends AsyncConstruct implements TLCallback
public function cleanup(): void
{
$this->referenceDatabase = new ReferenceDatabase($this);
yield from $this->referenceDatabase->init();
$callbacks = [$this, $this->referenceDatabase];
if (!($this->authorization['user']['bot'] ?? false)) {
$callbacks[] = $this->minDatabase;