mirror of
https://github.com/HMCL-dev/HMCL.git
synced 2025-09-16 23:37:14 -04:00
fix: crash when concurrency is negative.
This commit is contained in:
parent
1b539ade9d
commit
543238be4b
@ -297,6 +297,7 @@ public abstract class FetchTask<T> extends Task<T> {
|
||||
}
|
||||
|
||||
public static void setDownloadExecutorConcurrency(int concurrency) {
|
||||
concurrency = Math.max(concurrency, 1);
|
||||
synchronized (Schedulers.class) {
|
||||
downloadExecutorConcurrency = concurrency;
|
||||
if (DOWNLOAD_EXECUTOR != null) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user