1
0
mirror of https://github.com/danog/postgres.git synced 2024-11-30 04:29:12 +01:00

Remove circular reference in destructor

This commit is contained in:
Aaron Piotrowski 2019-09-30 17:38:49 -05:00
parent d5f70b2f4f
commit 1e1155d73d
No known key found for this signature in database
GPG Key ID: ADD1EF783EDE9EEB

View File

@ -52,9 +52,10 @@ final class PqUnbufferedResultSet implements ResultSet
return;
}
asyncCall(function () {
$producer = $this->producer;
asyncCall(static function () use ($producer) {
try {
while (yield $this->producer->advance());
while (yield $producer->advance());
} catch (\Throwable $exception) {
// Ignore iterator failure when destroying.
}