提交 7fb4591b 编写于 作者: D Daniel Beck

Merge pull request #1353 from daniel-beck/JENKINS-24095

[FIXED JENKINS-24095] Ensure only numExecutors exist when reducing
......@@ -729,9 +729,16 @@ public /*transient*/ abstract class Computer extends Actionable implements Acces
availableNumbers.remove(executor.getNumber());
for (Integer number : availableNumbers) {
Executor e = new Executor(this, number);
executors.add(e);
/* There may be busy executors with higher index, so only
fill up until numExecutors is reached.
Extra executors will call removeExecutor(...) and that
will create any necessary executors from #0 again. */
if (executors.size() < numExecutors) {
Executor e = new Executor(this, number);
executors.add(e);
}
}
}
/**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册