File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1515 pass
1616
1717try :
18- from websockets .exceptions import ConnectionClosedError # type: ignore
18+ from websockets .exceptions import ConnectionClosedError , ConnectionClosedOK # type: ignore
1919except ImportError :
20- from websockets import ConnectionClosedError # type: ignore
20+ from websockets import ConnectionClosedError , ConnectionClosedOK # type: ignore
2121
2222
2323Proxy = None
@@ -226,7 +226,9 @@ async def _read_loop(self):
226226 asyncio .IncompleteReadError ,
227227 gaierror ,
228228 ConnectionClosedError ,
229+ ConnectionClosedOK ,
229230 BinanceWebsocketClosed ,
231+ BinanceWebsocketUnableToConnect ,
230232 ) as e :
231233 # reports errors and continue loop
232234 self ._log .error (f"{ e .__class__ .__name__ } ({ e } )" )
@@ -236,7 +238,6 @@ async def _read_loop(self):
236238 "m" : f"{ e } " ,
237239 })
238240 except (
239- BinanceWebsocketUnableToConnect ,
240241 BinanceWebsocketQueueOverflow ,
241242 Exception ,
242243 ) as e :
You can’t perform that action at this time.
0 commit comments