mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-11 03:17:49 +00:00
Restart tunnel if all *active* jobs have restarted.
This commit is contained in:
@@ -646,8 +646,9 @@ function Tunnel(properties) {
|
|||||||
if (!_.contains(restarted, this)) {
|
if (!_.contains(restarted, this)) {
|
||||||
restarted.push(this);
|
restarted.push(this);
|
||||||
}
|
}
|
||||||
// restart tunnel if all jobs have restarted
|
// restart tunnel if all active jobs have restarted
|
||||||
if (_.isEmpty(_.difference(all, restarted))) {
|
var threshold = _.isFinite(throttled) ? throttled : 3;
|
||||||
|
if (active.length >= threshold && _.isEmpty(_.difference(active, restarted))) {
|
||||||
tunnel.restart();
|
tunnel.restart();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user