Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exeption in ProxySocketPool.php #728

Closed
armoreal opened this issue Dec 12, 2019 · 1 comment
Closed

Exeption in ProxySocketPool.php #728

armoreal opened this issue Dec 12, 2019 · 1 comment

Comments

@armoreal
Copy link

From time to time I got this error.

Exception: Error: Unknown socket: 0 in phar:///root/tg/madeline.phar/vendor/danog/madelineproto/src/danog/MadelineProto/ProxySocketPool.php:170
#0 phar:///root/tg/madeline.phar/vendor/danog/madelineproto/src/danog/MadelineProto/ProxySocketPool.php(161): danog\MadelineProto\ProxySocketPool->clearFromId(0)
#1 phar:///root/tg/madeline.phar/vendor/amphp/artax/lib/HttpSocketPool.php(104): danog\MadelineProto\ProxySocketPool->clear(Object(Amp\Socket\ClientSocket))
#2 phar:///root/tg/madeline.phar/vendor/amphp/artax/lib/DefaultClient.php(522): Amp\Artax\HttpSocketPool->clear(Object(Amp\Socket\ClientSocket))
#3 phar:///root/tg/madeline.phar/vendor/amphp/artax/lib/DefaultClient.php(403): Amp\Artax\DefaultClient->fail(Object(Amp\Artax\Internal\RequestCycle), Object(Amp\Artax\TimeoutException))
#4 phar:///root/tg/madeline.phar/vendor/amphp/amp/lib/Loop/NativeDriver.php(121): Amp\Artax\DefaultClient->Amp\Artax{closure}('cug', NULL)
#5 phar:///root/tg/madeline.phar/vendor/amphp/amp/lib/Loop/Driver.php(134): Amp\Loop\NativeDriver->dispatch(false)
#6 phar:///root/tg/madeline.phar/vendor/amphp/amp/lib/Loop/Driver.php(72): Amp\Loop\Driver->tick()
#7 phar:///root/tg/madeline.phar/vendor/amphp/amp/lib/Loop.php(84): Amp\Loop\Driver->run()
#8 phar:///root/tg/madeline.phar/vendor/danog/madelineproto/src/danog/MadelineProto/Tools.php(216): Amp\Loop::run(Object(Closure))
#9 phar:///root/tg/madeline.phar/vendor/danog/madelineproto/src/danog/MadelineProto/APIFactory.php(147): danog\MadelineProto\Tools::wait(Object(danog\MadelineProto\Coroutine))
#10 phar:///root/tg/madeline.phar/vendor/danog/madelineproto/src/danog/MadelineProto/InternalDoc.php(5251): danog\MadelineProto\APIFactory->__call('loop', Array)
#11 /root/tg/tel_reg.php(58): danog\MadelineProto\InternalDoc->loop()
#12 {main}
Next Error: Loop exceptionally stopped without resolving the promise in phar:///root/tg/madeline.phar/vendor/danog/madelineproto/src/danog/MadelineProto/Tools.php:218
Stack trace:
#0 phar:///root/tg/madeline.phar/vendor/danog/madelineproto/src/danog/MadelineProto/APIFactory.php(147): danog\MadelineProto\Tools::wait(Object(danog\MadelineProto\Coroutine))
#1 phar:///root/tg/madeline.phar/vendor/danog/madelineproto/src/danog/MadelineProto/InternalDoc.php(5251): danog\MadelineProto\APIFactory->__call('loop', Array)
#2 /root/tg/tel.php(58): danog\MadelineProto\InternalDoc->loop()
#3 {main}

I tried to catch this exeption using this code, but it doesn't help.

try {
$GLOBALS['MadelineProto']->loop();
} catch (Exception $e){
print_r($e);
}
Is there way to preserve script from crashing?

@danog
Copy link
Owner

danog commented Dec 26, 2019

Fixed

@danog danog closed this as completed Dec 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants