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 17
17
- ext.eventsub
18
18
- Bug fixes
19
19
- 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.
20
21
21
22
22
23
2.8.2
Original file line number Diff line number Diff line change @@ -209,9 +209,14 @@ async def pump(self) -> None:
209
209
await self .connect ()
210
210
return
211
211
212
- except TypeError as e :
212
+ except TypeError as e :
213
213
logger .warning (f"Received bad frame: { e .args [0 ]} " )
214
214
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
+
215
220
except Exception as e :
216
221
logger .error ("Exception in the pump function!" , exc_info = e )
217
222
raise
You can’t perform that action at this time.
0 commit comments