From 9a067f4ae3543e4feeb8ff0b5398064f587b7b9d Mon Sep 17 00:00:00 2001 From: Robinson Date: Sat, 6 May 2023 00:18:45 +0200 Subject: [PATCH] Added short timeout for detecting the lan address --- src/dorkbox/netUtil/IP.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dorkbox/netUtil/IP.kt b/src/dorkbox/netUtil/IP.kt index 60c35f8..72dc64b 100644 --- a/src/dorkbox/netUtil/IP.kt +++ b/src/dorkbox/netUtil/IP.kt @@ -217,7 +217,7 @@ object IP { // it's MUCH easier to see if open a connection to 1.1.1.1 and get the interface this traffic was on, and use that interface IP address runCatching { Socket().use { - it.connect(InetSocketAddress("1.1.1.1", 80)) + it.connect(InetSocketAddress("1.1.1.1", 80), 100) return it.localAddress } }.onFailure {