diff --git a/syng/client.py b/syng/client.py index f53dd47..4bf61b4 100644 --- a/syng/client.py +++ b/syng/client.py @@ -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"]) diff --git a/typings/socketio/__init__.pyi b/typings/socketio/__init__.pyi index cb26f36..f0d707f 100644 --- a/typings/socketio/__init__.pyi +++ b/typings/socketio/__init__.pyi @@ -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]: ...