Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions binance/ws/reconnecting_websocket.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
pass

try:
from websockets.exceptions import ConnectionClosedError # type: ignore
from websockets.exceptions import ConnectionClosedError, ConnectionClosedOK # type: ignore
Copy link

Copilot AI Jul 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR title contains a spelling error: 'reconect' should be 'reconnect'.

Copilot uses AI. Check for mistakes.

except ImportError:
from websockets import ConnectionClosedError # type: ignore
from websockets import ConnectionClosedError, ConnectionClosedOK # type: ignore


Proxy = None
Expand Down Expand Up @@ -226,7 +226,9 @@ async def _read_loop(self):
asyncio.IncompleteReadError,
gaierror,
ConnectionClosedError,
ConnectionClosedOK,
BinanceWebsocketClosed,
BinanceWebsocketUnableToConnect,
) as e:
# reports errors and continue loop
self._log.error(f"{e.__class__.__name__} ({e})")
Expand All @@ -236,7 +238,6 @@ async def _read_loop(self):
"m": f"{e}",
})
except (
BinanceWebsocketUnableToConnect,
BinanceWebsocketQueueOverflow,
Exception,
) as e:
Expand Down
Loading