mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-04-21 00:07:51 +00:00
Reconnect a shard if disconnected during a HELLO OP
This commit is contained in:
parent
a361a08482
commit
ca5cbcbdf3
@ -192,6 +192,10 @@ class Shard:
|
||||
self.ws = await asyncio.wait_for(coro, timeout=60.0)
|
||||
except self._handled_exceptions as e:
|
||||
await self._handle_disconnect(e)
|
||||
except ReconnectWebSocket as e:
|
||||
_log.debug('Somehow got a signal to %s while trying to %s shard ID %s.', e.op, exc.op, self.id)
|
||||
op = EventType.resume if e.resume else EventType.identify
|
||||
self._queue_put(EventItem(op, self, e))
|
||||
except asyncio.CancelledError:
|
||||
return
|
||||
except Exception as e:
|
||||
|
Loading…
x
Reference in New Issue
Block a user