diff --git a/app/src/main/kotlin/com/looker/droidify/service/DownloadService.kt b/app/src/main/kotlin/com/looker/droidify/service/DownloadService.kt index edbfcd268..55c6eb93c 100644 --- a/app/src/main/kotlin/com/looker/droidify/service/DownloadService.kt +++ b/app/src/main/kotlin/com/looker/droidify/service/DownloadService.kt @@ -142,7 +142,7 @@ class DownloadService : ConnectionService() { isUpdate = isUpdate ) if (Cache.getReleaseFile(this@DownloadService, release.cacheFileName).exists()) { - runBlocking { publishSuccess(task) } + lifecycleScope.launch { publishSuccess(task) } return } cancelTasks(packageName) diff --git a/core/network/src/main/java/com/looker/network/KtorDownloader.kt b/core/network/src/main/java/com/looker/network/KtorDownloader.kt index 3f63c470a..39601571d 100644 --- a/core/network/src/main/java/com/looker/network/KtorDownloader.kt +++ b/core/network/src/main/java/com/looker/network/KtorDownloader.kt @@ -97,11 +97,8 @@ internal class KtorDownloader : Downloader { } catch (e: ValidationException) { target.delete() NetworkResponse.Error.Validation(e) - } catch (e: URLParserException) { - NetworkResponse.Error.Unknown(e) - } catch (e: IllegalStateException) { - NetworkResponse.Error.Unknown(e) - } catch (e: IllegalArgumentException) { + } catch (e: Exception) { + e.exceptCancellation() NetworkResponse.Error.Unknown(e) } }