diff --git a/tools/utils/http-helpers.js b/tools/utils/http-helpers.js index 5555433cf3..7cb8c7f4af 100644 --- a/tools/utils/http-helpers.js +++ b/tools/utils/http-helpers.js @@ -12,6 +12,7 @@ var auth = require('../meteor-services/auth.js'); var config = require('../meteor-services/config.js'); var release = require('../packaging/release.js'); var Console = require('../console/console.js').Console; +var timeoutScaleFactor = require('./utils.js').timeoutScaleFactor; // Helper that tracks bytes written to a writable @@ -244,6 +245,12 @@ _.extend(exports, { options.proxy = proxy; } + if (! options.timeout) { + // 15 seconds for timeout between initial response headers and data, + // and between chunks of data while reading the rest of the response. + options.timeout = 15000 * timeoutScaleFactor; + } + // request is the most heavy-weight of the tool's npm dependencies; don't // require it until we definitely need it. Console.debug("Doing HTTP request: ", options.method || 'GET', options.url);