Catch KeyDownloader::getMissingUrls exceptions

Signed-off-by: Graham <gpe@openrs2.org>
master
Graham 1 year ago
parent 33ecd68654
commit 9463a70520
  1. 10
      archive/src/main/kotlin/org/openrs2/archive/key/KeyImporter.kt

@ -75,16 +75,16 @@ public class KeyImporter @Inject constructor(
val urls = mutableSetOf<String>() val urls = mutableSetOf<String>()
for (downloader in downloaders) { for (downloader in downloaders) {
for (url in downloader.getMissingUrls(seenUrls)) { try {
try { for (url in downloader.getMissingUrls(seenUrls)) {
keys += downloader.download(url).map { key -> keys += downloader.download(url).map { key ->
Key(key, downloader.source) Key(key, downloader.source)
} }
urls += url urls += url
} catch (ex: IOException) {
logger.warn(ex) { "Failed to download keys from ${downloader.source.name}" }
continue
} }
} catch (ex: IOException) {
logger.warn(ex) { "Failed to download keys from ${downloader.source.name}" }
continue
} }
} }

Loading…
Cancel
Save