mirror of
https://github.com/yairm210/Unciv.git
synced 2025-02-23 13:10:54 +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:
parent
eb65791ea7
commit
f52ad60b51
@ -425,7 +425,7 @@ class OptionsPopup(val previousScreen: BaseScreen) : Popup(previousScreen) {
|
||||
}
|
||||
for (line in modLinks) {
|
||||
val label = Label(line.text, BaseScreen.skin)
|
||||
.apply { color = line.errorSeverityToReport.color }
|
||||
.apply { color = line.errorSeverityToReport.color }
|
||||
label.wrap = true
|
||||
it.add(label).width(stage.width / 2).row()
|
||||
}
|
||||
|
@ -9,9 +9,9 @@ class PlatformSpecificHelpersDesktop : GeneralPlatformSpecificHelpers {
|
||||
}
|
||||
|
||||
override fun isInternetConnected(): Boolean {
|
||||
return try{
|
||||
return try {
|
||||
InetAddress.getByName("8.8.8.8").isReachable(500) // Parameter timeout in milliseconds
|
||||
}catch (ex: Exception){
|
||||
} catch (ex: Throwable) {
|
||||
false
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user