From aed36aac8d9133318a85e7457d4551ad6947f4f9 Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Thu, 27 Dec 2018 22:49:32 +0100 Subject: [PATCH] Use 1ms timeout if get_updates timeout is 0 --- src/danog/MadelineProto/MTProtoTools/UpdateHandler.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/danog/MadelineProto/MTProtoTools/UpdateHandler.php b/src/danog/MadelineProto/MTProtoTools/UpdateHandler.php index e93eb4ab..64b5ed69 100644 --- a/src/danog/MadelineProto/MTProtoTools/UpdateHandler.php +++ b/src/danog/MadelineProto/MTProtoTools/UpdateHandler.php @@ -77,6 +77,9 @@ trait UpdateHandler if (empty($this->updates)) { $this->update_deferred = new Deferred(); + if (!$params['timeout']) { + $params['timeout'] = 0.001; + } yield any([$this->update_deferred->promise(), new Delayed($params['timeout'] * 1000)]); }