server: improved performance and stability with broken AI and human games, e.g. less memory leaks and out of memory errors with AI (related to #11285, #5023);

This commit is contained in:
Oleg Agafonov 2025-06-29 00:59:31 +04:00
parent 5626079be9
commit dfb84b09f3
5 changed files with 14 additions and 17 deletions

View file

@ -157,7 +157,7 @@ public class DownloadPicturesService extends DefaultBoundedRangeModel implements
@Override
public boolean isNeedCancel() {
return this.needCancel || (this.errorCount > MAX_ERRORS_COUNT_BEFORE_CANCEL) || Thread.interrupted();
return this.needCancel || (this.errorCount > MAX_ERRORS_COUNT_BEFORE_CANCEL) || Thread.currentThread().isInterrupted();
}
private void setNeedCancel(boolean needCancel) {