1 parent 9b1a946 commit fc94f4aCopy full SHA for fc94f4a
1 file changed
ui-app/src/main/kotlin/dev/clombardo/dnsnet/ui/app/viewmodel/HomeViewModel.kt
@@ -423,7 +423,9 @@ class HomeViewModel @Inject constructor(
423
424
fun pingAddress(address: String): Boolean =
425
try {
426
- InetAddress.getByName(address).isReachable(3_000)
+ InetAddress.getByName(
427
+ address.substringBeforeLast("/").substringAfterLast("/")
428
+ ).isReachable(3_000)
429
} catch (_: UnknownHostException) {
430
false
431
}
0 commit comments