diff --git a/mobile/src/main/java/be/mygod/vpnhotspot/TetheringService.kt b/mobile/src/main/java/be/mygod/vpnhotspot/TetheringService.kt index 3a943e80..bfa26c22 100644 --- a/mobile/src/main/java/be/mygod/vpnhotspot/TetheringService.kt +++ b/mobile/src/main/java/be/mygod/vpnhotspot/TetheringService.kt @@ -100,7 +100,9 @@ class TetheringService : Service(), VpnMonitor.Callback, IpNeighbourMonitor.Call this.neighbours = neighbours.values.toList() } override fun postIpNeighbourAvailable() { - val sizeLookup = neighbours.groupBy { it.dev }.mapValues { (_, neighbours) -> neighbours.size } + val sizeLookup = neighbours.groupBy { it.dev }.mapValues { (_, neighbours) -> + neighbours.count { it.state != IpNeighbour.State.FAILED } + } ServiceNotification.startForeground(this, routings.keys.associate { Pair(it, sizeLookup[it] ?: 0) }) }