From 2bac25d8cb4867eaac0beebfca6f52de83b5437f Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Mon, 16 Nov 2020 11:53:29 +0100 Subject: [PATCH] Do not unreference timeout watcher --- src/danog/MadelineProto/Tools.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/danog/MadelineProto/Tools.php b/src/danog/MadelineProto/Tools.php index 3bbba901c..6d448a661 100644 --- a/src/danog/MadelineProto/Tools.php +++ b/src/danog/MadelineProto/Tools.php @@ -305,6 +305,7 @@ abstract class Tools extends StrTools $resolved = false; do { try { + Logger::log("Starting event loop..."); Loop::run(function () use (&$resolved, &$value, &$exception, $promise) { $promise->onResolve(function ($e, $v) use (&$resolved, &$value, &$exception) { Loop::stop(); @@ -405,7 +406,7 @@ abstract class Tools extends StrTools $deferred = null; $temp->fail(new TimeoutException); }); - Loop::unreference($watcher); + //Loop::unreference($watcher); $promise->onResolve(function () use (&$deferred, $promise, $watcher) { if ($deferred !== null) { @@ -449,7 +450,7 @@ abstract class Tools extends StrTools $deferred = null; $temp->resolve($default); }); - Loop::unreference($watcher); + //Loop::unreference($watcher); $promise->onResolve(function () use (&$deferred, $promise, $watcher) { if ($deferred !== null) {