mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-13 17:28:57 +07:00
Fixed issue #6649 by checking for internet connection before starting the game if "online multiplayer" is selected
Many thanks to @SomeTroglodyte for most of the code and for explanations
This commit is contained in:
@ -11,7 +11,7 @@ class PlatformSpecificHelpersDesktop : GeneralPlatformSpecificHelpers {
|
||||
override fun isInternetConnected(): Boolean {
|
||||
return try {
|
||||
InetAddress.getByName("8.8.8.8").isReachable(500) // Parameter timeout in milliseconds
|
||||
}catch (ex: Exception){
|
||||
} catch (ex: Throwable) {
|
||||
false
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user