Add better data removal, fix small benign bug

This commit is contained in:
DaXcess committed 2024-08-13 11:31:54 +02:00
1 parent 576e2ef563
commit ef86e1e2d3
5 files changed
+32 -8

No files matched your search

+5
View File
@@ -516,6 +516,11 @@ impl songbird::EventHandler for SessionHandle {
}
EventContext::ClientDisconnect(ClientDisconnect { user_id }) => {
// Ignore disconnects if we're inactive
if !self.active().await.unwrap_or(false) {
return None;
}
match self.owner().await {
Ok(id) if id.get() == user_id.0 => {
debug!("Owner of session disconnected, stopping playback");