Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Memory leak when using persistent connections #514

Closed
Labels
Milestone
@mmoreram

Description

When using persistent connections, this code makes me think that could cause problems... This happens inside the handleRequest in StreamingServer file. If we use persistent connections, we are adding one close event per request, causing all responses being referenced, even when it is returned properly (not allowing GC make its work).

// cancel pending promise once connection closes
if ($response instanceof PromiseInterface && \method_exists($response, 'cancel')) {
 $conn->on('close', function () use ($response) {
 $response->cancel();
 });
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      AltStyle によって変換されたページ (->オリジナル) /