mirror of
https://github.com/HMCL-dev/HMCL.git
synced 2025-09-15 23:06:07 -04:00
fix: incorrect log in GetTask
This commit is contained in:
parent
89dbc1be4a
commit
8b16e8be4d
@ -82,6 +82,7 @@ public final class GetTask extends Task<String> {
|
||||
@Override
|
||||
public void execute() throws Exception {
|
||||
Exception exception = null;
|
||||
URL failedURL = null;
|
||||
boolean checkETag = true;
|
||||
for (int time = 0; time < retry; ++time) {
|
||||
URL url = urls.get(time % urls.size());
|
||||
@ -132,12 +133,13 @@ public final class GetTask extends Task<String> {
|
||||
}
|
||||
return;
|
||||
} catch (IOException ex) {
|
||||
failedURL = url;
|
||||
exception = ex;
|
||||
Logging.LOG.log(Level.WARNING, "Failed to download " + url + ", repeat times: " + time + 1, ex);
|
||||
Logging.LOG.log(Level.WARNING, "Failed to download " + url + ", repeat times: " + (time + 1), ex);
|
||||
}
|
||||
}
|
||||
if (exception != null)
|
||||
throw new DownloadException(urls.get(0), exception);
|
||||
throw new DownloadException(failedURL, exception);
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user