Skip to content

Commit 9fd3719

Browse files
committed
Handle TimeoutError gracefully
1 parent 5b40b06 commit 9fd3719

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎bot/exts/pixels.py‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,8 @@ async def consume_stream(self) -> None:
9999
except asyncio.CancelledError:
100100
log.info("Pixels stream consumer task cancelled.")
101101
break
102+
except TimeoutError:
103+
log.info("Pixels stream connection timed out. Reconnecting...")
102104
except Exception:
103105
log.exception("Error consuming Pixels API stream.")
104106
await asyncio.sleep(5)

0 commit comments

Comments
 (0)