Skip to content

http: responseKeepAlive incorrect usage of finished? #28701

Closed
@ronag

Description

@ronag

Having a hard time to wrap my head around this one. But this looks like a potential bug:

https://github.com/nodejs/node/blob/master/lib/_http_client.js#L621

It seems to assume that if req.finished is true then prefinish has been emitted (or all data has been flushed) and frees the socket for re-use even though more data might be written to it. req.finished just means that end() has been called, not that no more data is going to be written to the socket.

I'm not sure if this is actually a problem. Haven't been able to create any sensible repo case that fails. But it looks very suspect...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions