Fix switching download source problem
This commit is contained in:
1 parent
6aaad71126
commit
115bc85c58
2 files changed
+6
-3
No files matched your search
+5
-2
@@ -121,8 +121,11 @@ public class FileDownloadTask extends Task implements PreviousResult<File>, Prev
|
||||
if (repeat > 0) {
|
||||
HMCLog.warn("Failed to download, repeat: " + repeat);
|
||||
if (failedCallbackReturnsNewURL != null) {
|
||||
url = IOUtils.parseURL(failedCallbackReturnsNewURL.apply(repeat));
|
||||
HMCLog.warn("Switch to: " + url);
|
||||
URL tmp = IOUtils.parseURL(failedCallbackReturnsNewURL.apply(repeat));
|
||||
if (tmp != null) {
|
||||
url = tmp;
|
||||
HMCLog.warn("Switch to: " + url);
|
||||
}
|
||||
}
|
||||
}
|
||||
try {
|
||||
|
||||
Reference in new issue
Block a user