From 9463a705203723e5c9371d21aab0c11798817d5a Mon Sep 17 00:00:00 2001 From: Graham Date: Fri, 5 May 2023 00:21:21 +0100 Subject: [PATCH] Catch KeyDownloader::getMissingUrls exceptions Signed-off-by: Graham --- .../main/kotlin/org/openrs2/archive/key/KeyImporter.kt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/archive/src/main/kotlin/org/openrs2/archive/key/KeyImporter.kt b/archive/src/main/kotlin/org/openrs2/archive/key/KeyImporter.kt index a82a6cb098..3932edf61f 100644 --- a/archive/src/main/kotlin/org/openrs2/archive/key/KeyImporter.kt +++ b/archive/src/main/kotlin/org/openrs2/archive/key/KeyImporter.kt @@ -75,16 +75,16 @@ public class KeyImporter @Inject constructor( val urls = mutableSetOf() for (downloader in downloaders) { - for (url in downloader.getMissingUrls(seenUrls)) { - try { + try { + for (url in downloader.getMissingUrls(seenUrls)) { keys += downloader.download(url).map { key -> Key(key, downloader.source) } 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 } }