Skip to content

Commit 476ffa4

Browse files
committed
Fix pubsub RECONNECT messages
Fix pubsub RECONNECT messages
1 parent ab9d63e commit 476ffa4

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

docs/changelog.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ Master
3434
- :func:`~twitchio.ext.eventsub.EventSubClient.subscribe_channel_shoutout_create`
3535
- :func:`~twitchio.ext.eventsub.EventSubClient.subscribe_channel_shoutout_receive`
3636

37+
- ext.pubsub
38+
- Bug fixes
39+
- Fix forced RECONNECT messages
40+
3741
2.5.0
3842
======
3943
- TwitchIO

twitchio/ext/pubsub/websocket.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,3 +203,7 @@ async def handle_response(self, message: dict):
203203
elif message["nonce"]:
204204
logger.debug(f"Received OK response for nonce {message['nonce']}")
205205
self.client.run_event("pubsub_nonce", message)
206+
207+
async def handle_reconnect(self, message: dict):
208+
logger.warning("Received RECONNECT response from pubsub edge. Reconnecting")
209+
await asyncio.shield(self.reconnect())

0 commit comments

Comments
 (0)