change RPC agent default

This commit is contained in:
Matias Alejo Garcia 2014-01-15 21:51:51 -03:00
parent 0d3a80639a
commit 7c787edf85

View File

@ -16,7 +16,7 @@ function ClassSpec(b) {
this.pass = opts.pass || 'pass'; this.pass = opts.pass || 'pass';
this.protocol = (opts.protocol == 'http') ? http : https; this.protocol = (opts.protocol == 'http') ? http : https;
this.batchedCalls = null; this.batchedCalls = null;
this.keepConnectionAlive = opts.keepConnectionAlive || false; this.disableAgent = opts.disableAgent || false;
} }
RpcClient.prototype.batch = function(batchCallback, resultCallback) { RpcClient.prototype.batch = function(batchCallback, resultCallback) {
@ -147,7 +147,7 @@ function ClassSpec(b) {
path: '/', path: '/',
method: 'POST', method: 'POST',
port: self.port, port: self.port,
agent: self.keepConnectionAlive ? undefined : false, agent: self.disableAgent ? false : undefined,
}; };
if(self.httpOptions) { if(self.httpOptions) {
for(var k in self.httpOptions) { for(var k in self.httpOptions) {