Merge pull request #25 from PlayNetwork/master

Fixes a bug that causes HTTPS to never be used.
This commit is contained in:
spenceralger
2014-01-14 09:45:54 -08:00

View File

@ -39,7 +39,9 @@ function HttpConnector(host, config) {
maxKeepAliveTime: 3e5 // 5 minutes
});
this.agent = new KeepAliveAgent({
var KeepAliveAgent_ = this.host.protocol === 'https' ? KeepAliveAgent.HttpsAgent : KeepAliveAgent;
this.agent = new KeepAliveAgent_({
maxSockets: config.maxSockets,
maxKeepAliveRequests: config.maxKeepAliveRequests,
maxKeepAliveTime: config.maxKeepAliveTime