Skip to content

Wrong definition of keepAliveMsecs in http.Agent documentation #7335

Closed
@calibr

Description

@calibr

Documentation for keepAliveMsecs says:

 When using HTTP KeepAlive,
 how often to send TCP KeepAlive packets over sockets being kept alive.

But internally http.Agent just uses keepAliveMsecs in socket.setKeepAlive(true, self.keepAliveMsecs); (https://github.com/nodejs/node/blob/master/lib/_http_agent.js#L73)

From docs for socket.setKeepAlive([enable][, initialDelay]):

Set initialDelay (in milliseconds) to set the delay between
the last data packet received and the first keepalive probe.

So really keepAliveMsecs doesn't mean how often keep alive probe will be sent, it means delay between the last data received and the first keep alive probe.

Metadata

Metadata

Assignees

No one assigned

    Labels

    docIssues and PRs related to the documentations.httpIssues or PRs related to the http subsystem.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions