Fix: prevent clients making emergency saves twice if server disconnects #8477
Motivation / Problem
While reading through issues, I found this comment:
Clearly, that is wrong, so I looked into it. Found the fix.
This was clearly overlooked during the initial implementation of #6796 . Also cleaned up the code a bit, and removed a curse-word .. we shouldn't be doing that anymore ;)
None I know of
Checklist for review
Some things are not automated, and forgotten often. This list is a reminder for the reviewers.
What a silly question! Of course I checked :D And no, it does not. This only fixes the observation you did in the comment.
Your analysis of the problem in that ticket is correct, and basically, it is not a bug. There currently is no clean way (that I can see) to start an additional thread to do the saving in, as we are about to jump back to the main menu. As we don't do async, and the drawing-thread is controlled (via a lock) in the main gameloop, there are not that many options :) It would require another game-mode and a placeholder graphics .. not sure that is worth it. But I will comment this too in the issue after merging this PR :D