Commit 15a5a4a9 authored by isaacs's avatar isaacs
Browse files

http: Only send connection:keep-alive if necessary

In cases where the Agent has maxSockets=Infinity, and
keepAlive=false, there's no case where we won't immediately close the
connection after the response is completed.

Since we're going to close it anyway, send a `connection:close` header
rather than a `connection:keep-alive` header.  Still send the
`connection:keep-alive` if the agent will actually reuse the socket,
however.

Closes #5838
parent 689e5c9d
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment