Skip to content

Commit

Permalink
fix: fix case where runningworkers became negative
Browse files Browse the repository at this point in the history
Signed-off-by: Alan D. Tse <alandtse@gmail.com>
  • Loading branch information
alandtse committed Oct 4, 2019
1 parent 9988627 commit 7ad83ea
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/scripts/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -701,6 +701,7 @@ function processqueue(priority = 0) {
}
function dowork(message) {
spawnworkers();
runningworkers = runningworkers >= 0 ? runningworkers : 0;
var offset = options.maxworkers - runningworkers;
if (options.maxworkers > runningworkers) {
for (
Expand Down

0 comments on commit 7ad83ea

Please sign in to comment.