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

Fix PqHandle #46

Merged
merged 1 commit into from
Sep 20, 2021
Merged

Fix PqHandle #46

merged 1 commit into from
Sep 20, 2021

Conversation

enumag
Copy link
Contributor

@enumag enumag commented Sep 6, 2021

Several times now I have seen this error:

[ErrorException]                                                      
Warning: foreach() argument must be of type array|object, null given  

Exception trace:
  at /app/vendor/amphp/postgres/src/PqHandle.php:68
 Amp\Postgres\PqHandle::Amp\Postgres\{closure}() at /app/vendor/amphp/amp/lib/Loop/EventDriver.php:63
 Amp\Loop\EventDriver->Amp\Loop\{closure}() at n/a:n/a
 EventBase->loop() at /app/vendor/amphp/amp/lib/Loop/EventDriver.php:255
 Amp\Loop\EventDriver->dispatch() at /app/vendor/amphp/amp/lib/Loop/Driver.php:138
 Amp\Loop\Driver->tick() at /app/vendor/amphp/amp/lib/Loop/Driver.php:72
 Amp\Loop\Driver->run() at /app/vendor/amphp/amp/lib/Loop/EventDriver.php:206
 Amp\Loop\EventDriver->run() at /app/vendor/amphp/amp/lib/Loop.php:95
 Amp\Loop::run() at /app/src/Module/Core/Console/RunLoopCommand.php:77
 App\Module\Core\Console\RunLoopCommand->execute() at /app/vendor/symfony/console/Command/Command.php:299
 Symfony\Component\Console\Command\Command->run() at /app/vendor/symfony/console/Application.php:996
 Symfony\Component\Console\Application->doRunCommand() at /app/vendor/symfony/framework-bundle/Console/Application.php:96
 Symfony\Bundle\FrameworkBundle\Console\Application->doRunCommand() at /app/vendor/symfony/console/Application.php:295
 Symfony\Component\Console\Application->doRun() at /app/vendor/symfony/framework-bundle/Console/Application.php:82
 Symfony\Bundle\FrameworkBundle\Console\Application->doRun() at /app/vendor/symfony/console/Application.php:167
 Symfony\Component\Console\Application->run() at /app/bin/console:25

Sadly it's pretty much random so I have no idea what the circumstances are nor can I give you a way to reproduce it. It started to appear when I tried to upgrade to amphp/postgres v1.4.

@trowski
Copy link
Member

trowski commented Sep 20, 2021

Thanks, clearly that was an oversight. It only comes up if polling the connection fails, which I'm not sure how to simulate in a test, so that's why it was overlooked.

@trowski trowski merged commit 71d1925 into amphp:master Sep 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants