diff options
| author | acdenisSK <[email protected]> | 2017-07-23 20:11:36 +0200 |
|---|---|---|
| committer | acdenisSK <[email protected]> | 2017-07-23 20:11:36 +0200 |
| commit | 824f8cb63271ac3907a9c8223b08b7ee6ff0d746 (patch) | |
| tree | d414ef29d51ed5dac962168f75befe1df3dc85d4 | |
| parent | PhantomData begone (diff) | |
| download | serenity-824f8cb63271ac3907a9c8223b08b7ee6ff0d746.tar.xz serenity-824f8cb63271ac3907a9c8223b08b7ee6ff0d746.zip | |
Ignore protocol errors
Without ignoring, sometimes serenity would start auto-reconnecting and spamming the console quite a lot, but not sure why do these errors happen. Still, ignoring them doesn't seem to do any harm.
| -rw-r--r-- | src/gateway/shard.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gateway/shard.rs b/src/gateway/shard.rs index 473c17b..8e0beee 100644 --- a/src/gateway/shard.rs +++ b/src/gateway/shard.rs @@ -495,6 +495,7 @@ impl Shard { self.reconnect().and(Ok(None)) } }, + Err(Error::WebSocket(WebSocketError::ProtocolError(..))) => Ok(None), Err(Error::WebSocket(why)) => { if let WebSocketError::NoDataAvailable = why { if self.heartbeat_instants.1.is_none() { |