Suppress cancellation again

This commit is contained in:
Mygod
2020-07-19 02:38:45 +08:00
parent 2da3b9b5a3
commit c8c3cb00b7

View File

@@ -7,6 +7,7 @@ import be.mygod.vpnhotspot.net.Routing
import be.mygod.vpnhotspot.net.TetherType import be.mygod.vpnhotspot.net.TetherType
import be.mygod.vpnhotspot.net.wifi.WifiDoubleLock import be.mygod.vpnhotspot.net.wifi.WifiDoubleLock
import be.mygod.vpnhotspot.widget.SmartSnackbar import be.mygod.vpnhotspot.widget.SmartSnackbar
import kotlinx.coroutines.CancellationException
import kotlinx.coroutines.runBlocking import kotlinx.coroutines.runBlocking
import timber.log.Timber import timber.log.Timber
@@ -96,7 +97,7 @@ abstract class RoutingManager(private val caller: Any, val downstream: String, p
true true
} catch (e: Exception) { } catch (e: Exception) {
SmartSnackbar.make(e).show() SmartSnackbar.make(e).show()
Timber.w(e) if (e !is CancellationException) Timber.w(e)
routing = null routing = null
false false
} }