Skip to content

Commit

Permalink
Apply limit to https as well
Browse files Browse the repository at this point in the history
  • Loading branch information
fcavalieri committed Apr 14, 2017
1 parent ab9cb35 commit ab8f59f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/sync.js
Expand Up @@ -5,6 +5,7 @@ require('colors');
var Q = require('q');
var read = require('read');
var http = require('http');
var https = require('https');
var VFS = require('./vfs').VFS;

var Client = (function(){
Expand Down Expand Up @@ -200,10 +201,12 @@ var Client = (function(){
Client.prototype.sync = function(overwrite, deleteOrphaned, simulate, ignore, isOriginRemote, concurrency){
if (concurrency === undefined) {
http.globalAgent.maxSockets = 8;
https.globalAgent.maxSockets = 8;
console.log('Concurrency limit: 8.'.grey);
}
else {
http.globalAgent.maxSockets = concurrency;
https.globalAgent.maxSockets = concurrency;
console.log('Concurrency limit: ' + concurrency + '.'.grey);
}
var that = this;
Expand Down

0 comments on commit ab8f59f

Please sign in to comment.