Skip to content

Commit

Permalink
Slightly modify close resume logic
Browse files Browse the repository at this point in the history
  • Loading branch information
Austin Hellyer committed Jan 8, 2017
1 parent fb1daeb commit f894cfd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/client/gateway/shard.rs
Expand Up @@ -367,7 +367,10 @@ impl Shard {
_ => {},
}

if !clean && num != Some(1000) && num != Some(4004) && num != Some(4011) {
let resume = num.map(|x| x != 1000 && x != 4004 && self.session_id.is_some())
.unwrap_or(false);

if resume {
if let Some(session_id) = self.session_id.clone() {
match self.resume(session_id, receiver) {
Ok((ev, rec)) => return Ok(Some((ev, Some(rec)))),
Expand Down

0 comments on commit f894cfd

Please sign in to comment.