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