mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-27 05:46:43 -04:00
Fixed TurnChecker crash when using custom server (#6554)
This commit is contained in:
parent
7ced78f6a2
commit
8457c7ab1d
@ -27,7 +27,10 @@ object SimpleHttp {
|
||||
|
||||
with(urlObj.openConnection() as HttpURLConnection) {
|
||||
requestMethod = method // default is GET
|
||||
setRequestProperty("User-Agent", "Unciv/${UncivGame.Current.version}-GNU-Terry-Pratchett")
|
||||
if (UncivGame.isCurrentInitialized())
|
||||
setRequestProperty("User-Agent", "Unciv/${UncivGame.Current.version}-GNU-Terry-Pratchett")
|
||||
else
|
||||
setRequestProperty("User-Agent", "Unciv/Turn-Checker-GNU-Terry-Pratchett")
|
||||
|
||||
try {
|
||||
if (content.isNotEmpty()) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user