code: def exit_resync(self):
          
          print("********** exit & resync **********")
          try:
              if self.client_socket:
                  self.client_socket.close()
                  self.client_socket = None
              try:
                  self.exit()
              except Exception as e:
                  self._log_error(e)
              print("Pause for exit(s) ...")
              time.sleep(60)
          except (socket.error, ConnectionError):
              pass
          self.resync()
docs: Exit the current Minecraft and wait for new one to replace it.