From afc4d0931fa1bc73ef797e2b59570e2f8145d447 Mon Sep 17 00:00:00 2001 From: yawnt Date: Tue, 17 Sep 2013 12:14:52 +0200 Subject: [PATCH] [fix] pooled connections, closes #478 --- lib/caronte.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/caronte.js b/lib/caronte.js index 444e8fd..78d7bd4 100644 --- a/lib/caronte.js +++ b/lib/caronte.js @@ -32,6 +32,7 @@ proxy.createProxyServer = function createProxyServer(options) { " ws : ", " xfwd : ", " maxSock: ", + " agent : ", " } ", " ", "NOTE: `options.ws` and `options.ssl` are optional. ", @@ -45,7 +46,7 @@ proxy.createProxyServer = function createProxyServer(options) { options[key] = url.parse(options[key]); options[key].maxSockets = options.maxSock; - options[key].agent = new (options.ssl ? https.Agent : http.Agent)(options[key].maxSockets || 100); + options[key].agent = options.agent || false // new (options.ssl ? https.Agent : http.Agent)(options[key].maxSockets || 100); }); options.ee = new events.EventEmitter2({ wildcard: true, delimiter: ':' });