From 7f6fdfe2f6544b6ee8a7580019b75858faaec189 Mon Sep 17 00:00:00 2001 From: Bazen <49089563+bazen-teklehaymanot@users.noreply.github.com> Date: Thu, 7 Dec 2023 05:48:42 +0200 Subject: [PATCH 1/2] Updated README --- README.md | 2 +- memphis/memphis.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index f889f30..719b702 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 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..3740c40 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 reconnect attempt. 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. From 3ecd50ff2b7217ccabd7c090c40dd000e1c6e55c Mon Sep 17 00:00:00 2001 From: Bazen <49089563+bazen-teklehaymanot@users.noreply.github.com> Date: Thu, 7 Dec 2023 11:07:26 +0200 Subject: [PATCH 2/2] Updated infinite reconnection attempt guide --- README.md | 2 +- memphis/memphis.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 719b702..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 -1 + 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 3740c40..42d2216 100644 --- a/memphis/memphis.py +++ b/memphis/memphis.py @@ -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. + 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.