From 11fb47484ac47dec8d676197a29de97d58866723 Mon Sep 17 00:00:00 2001 From: yairm210 Date: Sun, 24 Nov 2024 10:28:32 +0200 Subject: [PATCH] Resolved MP update task concurrent modification exception --- core/src/com/unciv/logic/multiplayer/Multiplayer.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/com/unciv/logic/multiplayer/Multiplayer.kt b/core/src/com/unciv/logic/multiplayer/Multiplayer.kt index 9a6f3672b620a..b40cf545f6fd8 100644 --- a/core/src/com/unciv/logic/multiplayer/Multiplayer.kt +++ b/core/src/com/unciv/logic/multiplayer/Multiplayer.kt @@ -97,7 +97,7 @@ class Multiplayer { // An exception only happens here if the files can't be listed, should basically never happen throttle(lastFileUpdate, fileThrottleInterval, {}, action = {multiplayerFiles.updateSavesFromFiles()}) - for (game in multiplayerFiles.savedGames.values) { + for (game in multiplayerFiles.savedGames.values.toList()) { // since updates are long, .toList for immutability if (game in doNotUpdate) continue // Any games that haven't been updated in 2 weeks (!) are inactive, don't waste your time if (Duration.between(Instant.ofEpochMilli(game.fileHandle.lastModified()), Instant.now())