diff --git a/README.md b/README.md index f889f30..50a0f0d 100644 --- a/README.md +++ b/README.md @@ -57,7 +57,7 @@ async def main(): password="", # depends on how Memphis deployed - default is connection token-based authentication port=, # defaults to 6666 reconnect=True, # defaults to True - max_reconnect=10, # defaults to 10 + max_reconnect=10, # defaults to -1 which means reconnect indefinitely reconnect_interval_ms=1500, # defaults to 1500 timeout_ms=1500, # defaults to 1500 # for TLS connection: diff --git a/memphis/memphis.py b/memphis/memphis.py index 59ee2de..42d2216 100644 --- a/memphis/memphis.py +++ b/memphis/memphis.py @@ -146,7 +146,7 @@ async def connect( password: str = "", port: int = 6666, reconnect: bool = True, - max_reconnect: int = 10, + max_reconnect: int = -1, reconnect_interval_ms: int = 1500, timeout_ms: int = 2000, cert_file: str = "", @@ -162,7 +162,7 @@ async def connect( password (str): depends on how Memphis deployed - default is connection token-based authentication. port (int, optional): port. Defaults to 6666. reconnect (bool, optional): whether to do reconnect while connection is lost. Defaults to True. - max_reconnect (int, optional): The reconnect attempt. Defaults to 10. + max_reconnect (int, optional): The maximum number of reconnection attempts. The default value is -1 which means reconnect indefinitely. reconnect_interval_ms (int, optional): Interval in milliseconds between reconnect attempts. Defaults to 1500. timeout_ms (int, optional): connection timeout in milliseconds. Defaults to 15000. key_file (string): path to tls key file.