Skip to content
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
@Yurunsoft

Description

@Yurunsoft

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions