nodules / asker

http.request wrapper with gzip, request retries and http.Agent tuning
MIT License
93 stars 11 forks source link

Do not enforce 1024 pool size on require #106

Closed floatdrop closed 8 years ago

floatdrop commented 9 years ago

Require of asker have side-effects:

var http = require('http');
console.log(http.Agent.defaultMaxSockets);
require('asker');
console.log(http.Agent.defaultMaxSockets);

Outputs:

5
1024

I believe this code is causing it.

kaero commented 9 years ago

Oh, it's known historical issue =( Sorry, but i think, we would not fix it in 0.x branch to avoid unexpected behavior for current users. It will be fixed in 1.0 with node.js 0.12 and io.js support where will be a bunch of another incompatibilities.

floatdrop commented 9 years ago

Oh, bummer. If inside application I will tune defaultMaxSockets to 4096 it will be erased. :(

kaero commented 9 years ago

$#@, any suggestions? :)

floatdrop commented 9 years ago

Document it and fix in 1.0 :dog:

1999 commented 9 years ago

@kaero а 1.0 скоро/soon?

Flackus commented 9 years ago

@1999 discussion is here https://github.com/nodules/asker/pull/110

Enforcing will be removed.