From 514aadd6af69062189f2252141be95821139a8b2 Mon Sep 17 00:00:00 2001 From: Mygod Date: Tue, 14 Jul 2020 23:14:01 +0800 Subject: [PATCH] Suppress CancellationException --- .../java/be/mygod/vpnhotspot/manage/RepeaterManager.kt | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/mobile/src/main/java/be/mygod/vpnhotspot/manage/RepeaterManager.kt b/mobile/src/main/java/be/mygod/vpnhotspot/manage/RepeaterManager.kt index ddbe1251..7cda9ec3 100644 --- a/mobile/src/main/java/be/mygod/vpnhotspot/manage/RepeaterManager.kt +++ b/mobile/src/main/java/be/mygod/vpnhotspot/manage/RepeaterManager.kt @@ -34,10 +34,7 @@ import be.mygod.vpnhotspot.util.formatAddresses import be.mygod.vpnhotspot.util.showAllowingStateLoss import be.mygod.vpnhotspot.widget.SmartSnackbar import kotlinx.android.parcel.Parcelize -import kotlinx.coroutines.Dispatchers -import kotlinx.coroutines.GlobalScope -import kotlinx.coroutines.launch -import kotlinx.coroutines.withContext +import kotlinx.coroutines.* import timber.log.Timber import java.net.NetworkInterface import java.net.SocketException @@ -215,7 +212,7 @@ class RepeaterManager(private val parent: TetheringFragment) : Manager(), Servic bssid = config.bssid this to false } catch (e: Exception) { - Timber.w(e) + if (e !is CancellationException) Timber.w(e) passphrase = group.passphrase bssid = group.owner?.deviceAddress?.let(MacAddressCompat.Companion::fromString) this to true