From b380947bc3a56794ea34ffc820429f2ba02fdbe3 Mon Sep 17 00:00:00 2001 From: Mygod Date: Tue, 21 Feb 2023 11:01:09 -0500 Subject: [PATCH] Suppress cancellation exception --- mobile/src/main/java/be/mygod/vpnhotspot/client/MacLookup.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mobile/src/main/java/be/mygod/vpnhotspot/client/MacLookup.kt b/mobile/src/main/java/be/mygod/vpnhotspot/client/MacLookup.kt index 0dbae039..2184ced6 100644 --- a/mobile/src/main/java/be/mygod/vpnhotspot/client/MacLookup.kt +++ b/mobile/src/main/java/be/mygod/vpnhotspot/client/MacLookup.kt @@ -8,6 +8,7 @@ import be.mygod.vpnhotspot.R import be.mygod.vpnhotspot.room.AppDatabase import be.mygod.vpnhotspot.util.connectCancellable import be.mygod.vpnhotspot.widget.SmartSnackbar +import kotlinx.coroutines.CancellationException import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.GlobalScope import kotlinx.coroutines.Job @@ -117,6 +118,7 @@ object MacLookup { if (result != null) nickname = result macLookupPending = false } + } catch (_: CancellationException) { } catch (e: Throwable) { Timber.w(e) if (explicit) SmartSnackbar.make(e).show()