Skip to content

Commit

Permalink
connect: move unexpected disconnect outside the loop again
Browse files Browse the repository at this point in the history
  • Loading branch information
photovoltex committed Dec 16, 2024
1 parent 891c946 commit be0a1d5
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions connect/src/spirc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -438,12 +438,14 @@ impl SpircTask {
error!("error updating connect state for volume update: {why}")
}
},
else => {
if let Err(why) = self.handle_disconnect().await {
error!("error during disconnect: {why}")
}
break
}
else => break,
}
}

if !self.shutdown && self.connect_state.is_active() {
warn!("unexpected shutdown");
if let Err(why) = self.handle_disconnect().await {
error!("error during disconnecting: {why}")
}
}

Expand Down

0 comments on commit be0a1d5

Please sign in to comment.