From e229d73834ecac5fce0f2b54782153287d22284a Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Tue, 4 Jun 2019 17:53:42 +0200 Subject: [PATCH] Bugfix --- src/danog/MadelineProto/MTProto.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/danog/MadelineProto/MTProto.php b/src/danog/MadelineProto/MTProto.php index 253c4ebd..5aea908d 100644 --- a/src/danog/MadelineProto/MTProto.php +++ b/src/danog/MadelineProto/MTProto.php @@ -220,7 +220,7 @@ class MTProto extends AsyncConstruct implements TLCallback } } yield $this->get_config_async([], ['datacenter' => $this->datacenter->curdc]); - $this->startUpdateSystem(); + $this->startUpdateSystem(true); $this->v = self::V; } @@ -432,7 +432,7 @@ class MTProto extends AsyncConstruct implements TLCallback yield $this->get_cdn_config_async($this->datacenter->curdc); $this->setup_logger(); } - $this->startUpdateSystem(); + $this->startUpdateSystem(true); if ($this->authorized === self::LOGGED_IN && !$this->authorization['user']['bot'] && $this->settings['peer']['cache_all_peers_on_startup']) { yield $this->get_dialogs_async($force); } @@ -899,9 +899,9 @@ class MTProto extends AsyncConstruct implements TLCallback $this->startUpdateSystem(); } - public function startUpdateSystem() + public function startUpdateSystem($anyway = false) { - if ($this->asyncInitPromise) { + if ($this->asyncInitPromise || $anyway) { return; }