Skip to content

Commit 965ab4f

Browse files
committed
Further improve resiliancy with bulk subscribe packet loss
1 parent 03e3305 commit 965ab4f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

discord/state.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -760,7 +760,9 @@ async def _flush(self) -> None:
760760
except Exception as exc:
761761
_log.debug('Bulk guild subscribe failed with %s. Requeuing changes...', exc, exc_info=True)
762762
# This should never raise
763-
await self._checked_add(payload)
763+
new_payload = self._pending
764+
self._pending = payload
765+
await self._checked_add(new_payload)
764766
return
765767

766768
for key, subscriptions in payload.items():

0 commit comments

Comments
 (0)