File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change 1717- ext.eventsub
1818 - Bug fixes
1919 - Fixed a crash where a Future could be None, causing unintentional errors.
20+ - Special-cased a restart when a specific known bad frame is received.
2021
2122
22232.8.2
Original file line number Diff line number Diff line change @@ -209,9 +209,14 @@ async def pump(self) -> None:
209209 await self .connect ()
210210 return
211211
212- except TypeError as e :
212+ except TypeError as e :
213213 logger .warning (f"Received bad frame: { e .args [0 ]} " )
214214
215+ if e .args [0 ] is None : # websocket was closed, reconnect
216+ logger .info ("Known bad frame, restarting connection" )
217+ await self .connect ()
218+ return
219+
215220 except Exception as e :
216221 logger .error ("Exception in the pump function!" , exc_info = e )
217222 raise
You can’t perform that action at this time.
0 commit comments