Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v6.x] http: overridable keep-alive behavior of Agent #18168

Closed
wants to merge 1 commit into from

Commits on Jan 15, 2018

  1. http: overridable keep-alive behavior of Agent

    Introduce two overridable `Agent` methods:
    
    * `keepSocketAlive(socket)`
    * `reuseSocket(socket, req)`
    
    These methods can be overridden by particular `Agent` class child to
    make keep-alive behavior customizable.
    
    Motivation: destroy persisted sockets after some configurable timeout.
    It is very non-trivial to do it with available primitives. Such program
    will most likely need to poke with undocumented events and methods of
    `Agent`. With introduced API such behavior is easy to implement.
    
    PR-URL: nodejs#13005
    Reviewed-By: Matteo Collina <[email protected]>
    Reviewed-By: Refael Ackermann <[email protected]>
    Reviewed-By: Colin Ihrig <[email protected]>
    Reviewed-By: Brian White <[email protected]>
    Reviewed-By: Michael Dawson <[email protected]>
    indutny committed Jan 15, 2018
    Configuration menu
    Copy the full SHA
    b0df19a View commit details
    Browse the repository at this point in the history