limit the autoconnect retries if the server is not available.
This commit is contained in:
parent
285deadf09
commit
648d3afc21
2 changed files with 2 additions and 2 deletions
|
@ -160,7 +160,7 @@ class Client:
|
|||
|
||||
self.connection_state = ConnectionState()
|
||||
self.set_log_level(config["config"]["log_level"])
|
||||
self.sio = socketio.AsyncClient(json=jsonencoder)
|
||||
self.sio = socketio.AsyncClient(json=jsonencoder, reconnection_attempts=-1)
|
||||
self.loop: Optional[asyncio.AbstractEventLoop] = None
|
||||
self.skipped: list[UUID] = []
|
||||
self.sources = configure_sources(config["sources"])
|
||||
|
|
|
@ -36,7 +36,7 @@ class AsyncServer:
|
|||
def instrument(self, auth: dict[str, str]) -> None: ...
|
||||
|
||||
class AsyncClient:
|
||||
def __init__(self, json: Any = None): ...
|
||||
def __init__(self, json: Any = None, reconnection_attempts: int = 0): ...
|
||||
def on(
|
||||
self, event: str, handler: Optional[Callable[..., Any]] = None
|
||||
) -> Callable[[ClientHandler], ClientHandler]: ...
|
||||
|
|
Loading…
Add table
Reference in a new issue