Redundant server close call causing subsequent restart attempts to fail
This seems like a regression due to the refactoring done recently where we are now properly waiting for all housekeeping to complete before restarting the server.
It feels like this happens when a restart is requested in the middle of a restart and can be fixed by keeping track of whether a restart is already in progress and ignoring subsequent restart requests until the restart has been completed.
Update: See note, below, for actual reasons.