-
Notifications
You must be signed in to change notification settings - Fork 30.5k
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
Difference between http.request({keepAlive}) and http.request({agent: {keepAlive}}) #1300
Comments
|
Fixes: nodejs#1300 PR-URL: nodejs#1384 Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Fixed in 69bc138, thanks for reporting! :) |
awwww now it makes sense.. the nodejs docs as the same issue. |
@Fishrock123 You sure this is the right fix? Reading this is confusing, it explains that I think we should just remove keepAlive and keepAliveMsecs from here and link to the Agent constructor where they are explained. |
These can only be specified in the options for http.Agent Fixes: nodejs#1300 PR-URL: nodejs#1392 Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Hi,
I have been playing with keepAlive in io.js and node 0.12. Something strange is that the documentation states that one could use:
But this line did not trigger keepAlive on my requests. I could not find a code path using it in the nodejs codebase.
Is this a mistake or am I missing something? Maybe agent keepAlive and request keepAlive are not the same thing, then maybe we could clarify things.
Using:
works, as shown in the tests https://github.com/joyent/node/blob/857975d5e7e0d7bf38577db0478d9e5ede79922e/test/simple/test-http-agent-keepalive.js
https://github.com/iojs/io.js/blob/v1.x/test/parallel/test-http-agent-keepalive.js
The text was updated successfully, but these errors were encountered: