From 3e2219cbb5a6bc433ecd27794349762e630a1e9a Mon Sep 17 00:00:00 2001 From: Valere Date: Wed, 5 Feb 2020 22:11:58 +0100 Subject: [PATCH] Ignore interrupted exception in setupRx --- .../src/main/java/im/vector/riotx/core/rx/RxConfig.kt | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/vector/src/main/java/im/vector/riotx/core/rx/RxConfig.kt b/vector/src/main/java/im/vector/riotx/core/rx/RxConfig.kt index bd87251a58..5673bb9c12 100644 --- a/vector/src/main/java/im/vector/riotx/core/rx/RxConfig.kt +++ b/vector/src/main/java/im/vector/riotx/core/rx/RxConfig.kt @@ -31,11 +31,14 @@ class RxConfig @Inject constructor( fun setupRxPlugin() { RxJavaPlugins.setErrorHandler { throwable -> Timber.e(throwable, "RxError") - - // Avoid crash in production, except if user wants it - if (vectorPreferences.failFast()) { - throw throwable + //is InterruptedException -> fine, some blocking code was interrupted by a dispose call + if (throwable !is InterruptedException) { + // Avoid crash in production, except if user wants it + if (vectorPreferences.failFast()) { + throw throwable + } } + } } }