Skip to content

Over file descriptor when not get body for response #368

Open
@xpader

Description

@xpader

Payload will not been destruct from memory when not read body.

while (true) {
    $url = 'Some short url';
    $response = $client->request(new Request($url));
    echo $response->getHeader('Location');
}

You can add a static counter on Payload construct and destruct, will find out.

How is it currently fixed in the own code?

Call $response->getBody()->buffer() or $response->getBody()->close() after read response.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions