Added short timeout for detecting the lan address
parent
d338e41241
commit
9a067f4ae3
|
@ -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
|
// 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 {
|
runCatching {
|
||||||
Socket().use {
|
Socket().use {
|
||||||
it.connect(InetSocketAddress("1.1.1.1", 80))
|
it.connect(InetSocketAddress("1.1.1.1", 80), 100)
|
||||||
return it.localAddress
|
return it.localAddress
|
||||||
}
|
}
|
||||||
}.onFailure {
|
}.onFailure {
|
||||||
|
|
Loading…
Reference in New Issue