fix: prevent infinite loop in some conditions
This commit is contained in:
parent
29ae948039
commit
8502c527e3
1 changed files with 5 additions and 1 deletions
|
@ -267,7 +267,11 @@ public class TileLegacyController extends AENetworkPowerTile implements ILocatab
|
|||
public void removeCPUs() {
|
||||
boolean changed = false;
|
||||
while (this.inactiveCPUs > MIN_INACTIVE) {
|
||||
changed = changed || removeLastIfNotBusy();
|
||||
if (removeLastIfNotBusy()) {
|
||||
changed = true;
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (changed) {
|
||||
try {
|
||||
|
|
Loading…
Reference in a new issue