1
0
mirror of https://github.com/danog/MadelineProto.git synced 2025-01-22 20:11:26 +01:00
This commit is contained in:
Daniil Gentili 2023-02-12 14:09:36 +01:00
parent aa85d66883
commit aa321d9838
2 changed files with 3 additions and 2 deletions

View File

@ -41,6 +41,7 @@ use Webmozart\Assert\Assert;
use function Amp\async;
use function Amp\Future\await;
use function Amp\Future\awaitFirst;
/**
* Main API wrapper for MadelineProto.
@ -409,7 +410,7 @@ final class API extends AbstractAPI
$instance->startAndLoopLogic($eventHandler[$k], $started[$k]);
});
}
await($promises);
awaitFirst($promises);
} finally {
if (EventLoop::getErrorHandler() === $cb) {
EventLoop::setErrorHandler($prev);

View File

@ -9,7 +9,7 @@ if (defined('MADELINE_POLYFILLED')) {
define('MADELINE_POLYFILLED', true);
if (PHP_VERSION_ID === 80202 || PHP_VERSION_ID === 80115) {
echo('PHP 8.2.2 and PHP 8.1.15 have a critical garbage collector bug, please switch to PHP 8.1.14, PHP 8.2.1 or PHP 8.2.3 once it gets released: https://github.com/php/php-src/issues/10496');
echo('PHP 8.2.2 and PHP 8.1.15 have a critical garbage collector bug, please switch to PHP 8.1.14, PHP 8.2.1 or PHP 8.2.3 once it gets released: https://github.com/php/php-src/issues/10496'.PHP_EOL);
die(1);
}