From 544340bec36a5ae7c0f8b00c751422f11a3cfe92 Mon Sep 17 00:00:00 2001 From: Mygod Date: Fri, 22 Feb 2019 12:43:43 +0800 Subject: [PATCH] Suppress logging mac parser for deleting entries --- mobile/src/main/java/be/mygod/vpnhotspot/net/IpNeighbour.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mobile/src/main/java/be/mygod/vpnhotspot/net/IpNeighbour.kt b/mobile/src/main/java/be/mygod/vpnhotspot/net/IpNeighbour.kt index a0bbeb29..f0f82028 100644 --- a/mobile/src/main/java/be/mygod/vpnhotspot/net/IpNeighbour.kt +++ b/mobile/src/main/java/be/mygod/vpnhotspot/net/IpNeighbour.kt @@ -56,7 +56,8 @@ data class IpNeighbour(val ip: InetAddress, val dev: String, val lladdr: Long, v lladdr.macToLong() } catch (e: NumberFormatException) { if (match.groups[4] == null) return emptyList() - Timber.w(IOException("Failed to find MAC address for $line")) + // for DELETING, we only care about IP address and do not care if MAC is not present + if (state != State.DELETING) Timber.w(IOException("Failed to find MAC address for $line")) 0L } val result = IpNeighbour(ip, dev, mac, state)