Skip to content

Commit

Permalink
EDT fix: Run changeToGameSave request on its own thread (#12750)
Browse files Browse the repository at this point in the history
  • Loading branch information
DanVanAtta authored Jul 23, 2024
1 parent f68f75a commit bc4c018
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import java.nio.file.Path;
import javax.swing.AbstractAction;
import lombok.extern.slf4j.Slf4j;
import org.triplea.java.ThreadRunner;

/** An action for loading a save game across all network nodes from a client node. */
@Slf4j
Expand Down Expand Up @@ -44,6 +45,7 @@ private void changeToGameSave(final Path saveGame) {
log.error("Failed to read file: " + saveGame, e);
return;
}
serverStartupRemote.changeToGameSave(bytes, saveGame.getFileName().toString());
ThreadRunner.runInNewThread(
() -> serverStartupRemote.changeToGameSave(bytes, saveGame.getFileName().toString()));
}
}

0 comments on commit bc4c018

Please sign in to comment.