break once ConnectionClosed error

This commit is contained in:
Vaibhav159
2025-02-10 23:04:05 +05:30
parent b06b16adb7
commit 2c62d3bf32
2 changed files with 2 additions and 0 deletions

View File

@@ -87,6 +87,7 @@ class WebsocketService(ABC):
retry_count = 0 # Reset counter on successful message receive
except websockets.ConnectionClosed as e:
logger.warning(f"{self} connection closed: {e}")
break
except Exception as e:
retry_count += 1
if retry_count >= MAX_RETRIES: