amphp/mysql

Processor crashing due to no deferred being pending when mysql announcing "#70100 Connection was killed"

bwoebi opened this issue · 1 comments

PHP Fatal error:  Uncaught TypeError: Return value of Amp\Mysql\Internal\Processor::getDeferred() must be an instance of Amp\Deferred, null returned in vendor/amphp/mysql/lib/Internal/Processor.php:247
Stack trace:
#0 vendor/amphp/mysql/lib/Internal/Processor.php(586): Amp\Mysql\Internal\Processor->getDeferred()
#1 vendor/amphp/mysql/lib/Internal/Processor.php(1266): Amp\Mysql\Internal\Processor->handleError('\xFF\x87\x07#70100Connec...')
#2 vendor/amphp/mysql/lib/Internal/Processor.php(242): Amp\Mysql\Internal\Processor->parsePayload('\xFF\x87\x07#70100Connec...')
#3 vendor/amphp/mysql/lib/Internal/Processor.php(216): Amp\Mysql\Internal\Processor->processData(Array)

Error message #70100 "Connection was killed" may be sent out-of-band (i.e. not in response to a particular query) and the processor currently seems to be unable to handle out-of-band error messages properly.

To be precise: MariaDB. Mysql does not send that particular error message with this given sql state

@bwoebi Please try the branch I pushed. I'm not really sure what to do with the error message though… without anything pending I'm just closing the connection.