Discard null sequences in the gateway.
This was forbidding the Discord gateway from allowing us to RESUME properly, causing an over-abundance of READY being called.
This commit is contained in:
		| @@ -186,7 +186,7 @@ class DiscordWebSocket(websockets.client.WebSocketClientProtocol): | ||||
|  | ||||
|         log.info('Created websocket connected to {}'.format(gateway)) | ||||
|  | ||||
|         # poll the event for OP HELLO | ||||
|         # poll event for OP Hello | ||||
|         yield from ws.poll_event() | ||||
|  | ||||
|         if not resume: | ||||
| @@ -289,9 +289,9 @@ class DiscordWebSocket(websockets.client.WebSocketClientProtocol): | ||||
|  | ||||
|         op = msg.get('op') | ||||
|         data = msg.get('d') | ||||
|  | ||||
|         if 's' in msg: | ||||
|             state.sequence = msg['s'] | ||||
|         seq = msg.get('s') | ||||
|         if seq is not None: | ||||
|             state.sequence = seq | ||||
|  | ||||
|         if op == self.RECONNECT: | ||||
|             # "reconnect" can only be handled by the Client | ||||
|   | ||||
		Reference in New Issue
	
	Block a user