amp
amp copied to clipboard
UvDriver warnings
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.
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.
I have this issue in v3 too using madelineproto as rest api (passed uv loop handle is already closed ....)