Client/ConsoleMonitor: Added a boolean flag to ensure a restart is triggered only once.