aboutsummaryrefslogtreecommitdiff
path: root/src/client
diff options
context:
space:
mode:
authorZeyla Hellyer <[email protected]>2018-03-27 17:04:10 -0700
committerZeyla Hellyer <[email protected]>2018-03-27 17:04:10 -0700
commit21fe999d23cb0e4e76812537b48edadeab5a1540 (patch)
tree92f126ecc2c2408d04cfec37cdae146069fa1e7e /src/client
parentFix help precendence (diff)
downloadserenity-21fe999d23cb0e4e76812537b48edadeab5a1540.tar.xz
serenity-21fe999d23cb0e4e76812537b48edadeab5a1540.zip
Fix heartbeat checking
If a heartbeat acknowledgement is not received, then the shard should restart.
Diffstat (limited to 'src/client')
-rw-r--r--src/client/bridge/gateway/shard_runner.rs9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/client/bridge/gateway/shard_runner.rs b/src/client/bridge/gateway/shard_runner.rs
index bfe4214..466ce63 100644
--- a/src/client/bridge/gateway/shard_runner.rs
+++ b/src/client/bridge/gateway/shard_runner.rs
@@ -94,14 +94,9 @@ impl<H: EventHandler + Send + Sync + 'static> ShardRunner<H> {
}
// check heartbeat
- if let Err(why) = self.shard.check_heartbeat() {
+ if !self.shard.check_heartbeat() {
warn!(
- "[ShardRunner {:?}] Error heartbeating: {:?}",
- self.shard.shard_info(),
- why,
- );
- debug!(
- "[ShardRunner {:?}] Requesting restart",
+ "[ShardRunner {:?}] Error heartbeating",
self.shard.shard_info(),
);