Catch KeyDownloader::getMissingUrls exceptions

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

@ -75,18 +75,18 @@ 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) { } catch (ex: IOException) {
logger.warn(ex) { "Failed to download keys from ${downloader.source.name}" } logger.warn(ex) { "Failed to download keys from ${downloader.source.name}" }
continue continue
} }
} }
}
database.execute { connection -> database.execute { connection ->
connection.prepareStatement( connection.prepareStatement(

Loading…
Cancel
Save