MCPcopy Create free account
hub / github.com/Syncplay/syncplay / reconnectToServer

Method reconnectToServer

syncplay/ui/gui.py:1010–1021  ·  view source on GitHub ↗

Trigger a manual reconnection using the client's built-in retry mechanism. This is simpler and more reliable than doing a complete restart.

(self)

Source from the content-addressed store, hash-verified

1008
1009 @needsClient
1010 def reconnectToServer(self):
1011 """
1012 Trigger a manual reconnection using the client's built-in retry mechanism.
1013 This is simpler and more reliable than doing a complete restart.
1014 """
1015 try:
1016 if self._syncplayClient:
1017 self._syncplayClient.manualReconnect()
1018 else:
1019 self.showErrorMessage(getMessage("connection-failed-notification"))
1020 except Exception as e:
1021 self.showErrorMessage(getMessage("reconnect-failed-error").format(str(e)))
1022
1023 def exitSyncplay(self):
1024 self._syncplayClient.stop()

Callers

nothing calls this directly

Calls 3

showErrorMessageMethod · 0.95
getMessageFunction · 0.90
manualReconnectMethod · 0.80

Tested by

no test coverage detected