Added short timeout for detecting the lan address

master
Robinson 2023-05-06 00:18:45 +02:00
parent d338e41241
commit 9a067f4ae3
No known key found for this signature in database
GPG Key ID: 8E7DB78588BD6F5C
1 changed files with 1 additions and 1 deletions

View File

@ -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 {