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

View File

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