aboutsummaryrefslogtreecommitdiff
path: root/src/client/gateway/error.rs
diff options
context:
space:
mode:
authorAustin Hellyer <[email protected]>2016-11-29 08:02:35 -0800
committerAustin Hellyer <[email protected]>2016-11-29 08:02:35 -0800
commit018684e3a562ac4f09fb92783d8fd06d679a2ce1 (patch)
treee32c1ff9542dc30461dffec1dd2dbc219e0023f8 /src/client/gateway/error.rs
parentRetrieve a new URL on reconnect (diff)
downloadserenity-018684e3a562ac4f09fb92783d8fd06d679a2ce1.tar.xz
serenity-018684e3a562ac4f09fb92783d8fd06d679a2ce1.zip
Remove duplicated gateway logic
Diffstat (limited to 'src/client/gateway/error.rs')
-rw-r--r--src/client/gateway/error.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/client/gateway/error.rs b/src/client/gateway/error.rs
index dc94209..3e355f5 100644
--- a/src/client/gateway/error.rs
+++ b/src/client/gateway/error.rs
@@ -12,6 +12,8 @@ pub enum Error {
ExpectedHello,
/// Expected a Ready or an InvalidateSession
InvalidHandshake,
+ /// Failed to reconnect after a number of attempts.
+ ReconnectFailure,
}
impl Display for Error {
@@ -26,6 +28,9 @@ impl Display for Error {
Error::InvalidHandshake => {
f.write_str("Expected Ready or InvalidateSession")
},
+ Error::ReconnectFailure => {
+ f.write_str("Failed to Reconnect")
+ },
}
}
}