From e1768c1a1bb9d3e76bef2214729a542efab05fbe Mon Sep 17 00:00:00 2001 From: clickingbuttons Date: Fri, 22 Jul 2022 11:03:43 -0400 Subject: [PATCH] Log expection message (#253) --- polygon/websocket/__init__.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/polygon/websocket/__init__.py b/polygon/websocket/__init__.py index 5b9b283f..b8ed4775 100644 --- a/polygon/websocket/__init__.py +++ b/polygon/websocket/__init__.py @@ -132,11 +132,11 @@ async def connect( if len(cmsg) > 0: await processor(cmsg) # type: ignore - except ConnectionClosedOK: - logger.debug("connection closed (OK)") + except ConnectionClosedOK as e: + logger.debug("connection closed (OK): %s", e) return - except ConnectionClosedError: - logger.debug("connection closed (ERR)") + except ConnectionClosedError as e: + logger.debug("connection closed (ERR): %s", e) reconnects += 1 self.scheduled_subs = set(self.subs) self.subs = set()