mirror of
https://github.com/danog/MadelineProto.git
synced 2024-11-27 08:34:41 +01:00
Do not unreference timeout watcher
This commit is contained in:
parent
9ea5a763a7
commit
2bac25d8cb
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user