From 94d2b280df5341b7d5e4e7c6c35bd109a76b103f Mon Sep 17 00:00:00 2001 From: Lennart Kats Date: Wed, 23 Mar 2016 10:27:53 +0000 Subject: [PATCH] Improve rest_client timeout behavior --- node_modules/c9/rest_client.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/node_modules/c9/rest_client.js b/node_modules/c9/rest_client.js index 8f42b1d0..931843b4 100644 --- a/node_modules/c9/rest_client.js +++ b/node_modules/c9/rest_client.js @@ -44,7 +44,11 @@ function RestClient(host, port, config) { port: port, path: path, method: method, - headers: headers + headers: headers, + timeout: config.timeout || 60 * 1000, + pool: config.pool || { + maxSockets: 100000 + } }; if (config.username) options.auth = config.username + ":" + config.password; @@ -141,4 +145,4 @@ function RestClient(host, port, config) { } } -module.exports = RestClient; +module.exports = RestClient; \ No newline at end of file