Skip to content

Commit

Permalink
Resolved MP update task concurrent modification exception
Browse files Browse the repository at this point in the history
  • Loading branch information
yairm210 committed Nov 24, 2024
1 parent 59bd7d2 commit 11fb474
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/src/com/unciv/logic/multiplayer/Multiplayer.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down

0 comments on commit 11fb474

Please sign in to comment.