From c77e47a8c553d5c4095da3c9a17f86edefe29c09 Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Sat, 28 Dec 2019 00:18:12 +0100 Subject: [PATCH] Bugfixes --- src/danog/MadelineProto/MTProtoTools/AuthKeyHandler.php | 2 +- src/danog/MadelineProto/Wrappers/Loop.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/danog/MadelineProto/MTProtoTools/AuthKeyHandler.php b/src/danog/MadelineProto/MTProtoTools/AuthKeyHandler.php index 10208734..ed13b0ab 100644 --- a/src/danog/MadelineProto/MTProtoTools/AuthKeyHandler.php +++ b/src/danog/MadelineProto/MTProtoTools/AuthKeyHandler.php @@ -660,7 +660,7 @@ trait AuthKeyHandler } continue; } - if (isset($this->init_auth_dcs[$id])) { + if (isset($this->init_auth_dcs[$id]) || !$socket->hasConnection(0)) { $this->pending_auth = true; continue; } diff --git a/src/danog/MadelineProto/Wrappers/Loop.php b/src/danog/MadelineProto/Wrappers/Loop.php index cf6c0f67..6ac09f96 100644 --- a/src/danog/MadelineProto/Wrappers/Loop.php +++ b/src/danog/MadelineProto/Wrappers/Loop.php @@ -51,7 +51,7 @@ trait Loop */ public function loop($callback = null) { - if (\is_callable($max_fcallbackorks)) { + if (\is_callable($callback)) { $this->logger->logger('Running async callable'); return yield $callback();