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

Method retry

syncplay/client.py:873–884  ·  view source on GitHub ↗
(retries)

Source from the content-addressed store, hash-verified

871 self._clientSupportsTLS = False
872
873 def retry(retries):
874 # Use shared state reset method
875 self._performRetryStateReset()
876 if retries == 0:
877 self.onDisconnect()
878 if retries > constants.RECONNECT_RETRIES:
879 reactor.callLater(0.1, self.ui.showErrorMessage, getMessage("connection-failed-notification"),
880 True)
881 reactor.callLater(0.1, self.stop, True)
882 return None
883
884 return(0.1 * (2 ** min(retries, 5)))
885
886 self._reconnectingService = ClientService(self._endpoint, self.protocolFactory, retryPolicy=retry)
887 try:

Callers

nothing calls this directly

Calls 3

onDisconnectMethod · 0.95
getMessageFunction · 0.90

Tested by

no test coverage detected