diff --git a/mobile/src/main/java/be/mygod/vpnhotspot/net/Subrouting.kt b/mobile/src/main/java/be/mygod/vpnhotspot/net/Subrouting.kt index 25598b8f..85b0fe02 100644 --- a/mobile/src/main/java/be/mygod/vpnhotspot/net/Subrouting.kt +++ b/mobile/src/main/java/be/mygod/vpnhotspot/net/Subrouting.kt @@ -35,7 +35,12 @@ class Subrouting(private val parent: Routing, priority: Int, val upstream: Strin } init { - TrafficRecorder.register(ip, upstream, parent.downstream, mac) + try { + TrafficRecorder.register(ip, upstream, parent.downstream, mac) + } catch (e: Exception) { + close() + throw e + } } override fun close() {