This repository was archived by the owner on Sep 28, 2022. It is now read-only.
This repository was archived by the owner on Sep 28, 2022. It is now read-only.
fetch bug when coroutine yield #29
Open
Description
Code:
<?php
Co\run(function () {
$pg = new Swoole\Coroutine\PostgreSQL();
$conn = $pg->connect("host=127.0.0.1 port=5432 dbname=test user=postgres password=1");
var_dump($conn, $pg->error);
$res = $pg->query('select * from tb_user');
\Swoole\Coroutine::sleep(1); // yield
var_dump($pg->fetchArray($res), $pg->error);
});
Output:
bool(true)
NULL
bool(false)
NULL