Closed
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();
});
}