amphp / amp

A non-blocking concurrency framework for PHP applications. 🐘
https://amphp.org/amp
MIT License
4.21k stars 255 forks source link

UvDriver warnings #328

Open enumag opened 4 years ago

enumag commented 4 years ago

I just got these warnings:

PHP Warning:  uv_update_time(): passed UVLoop handle is already closed in .../vendor/amphp/amp/lib/Loop/UvDriver.php on line 193
PHP Warning:  uv_now(): passed UVLoop handle is already closed in .../vendor/amphp/amp/lib/Loop/UvDriver.php on line 196

It happened right after an uncaught exception was thrown. Both warnings appeared several times. Then the process finally stopped.

trowski commented 2 years ago

I happened to see this myself just the other day on v3 when attempting to schedule a timer in a destructor during shutdown. I think the UvLoop handle was destroyed prior to the attempt to schedule the timer. We may need to make the handle nullable and ignore calls to the loop after destruct.

mtalaeii commented 9 months ago

I have this issue in v3 too using madelineproto as rest api (passed uv loop handle is already closed ....)