mirror of
https://github.com/librespot-org/librespot.git
synced 2025-10-03 09:49:31 +02:00
Fix: Delete the connect state only on spirc shutdown (#1555)
* fix: only delete the state on shutdown * chore: update changelog
This commit is contained in:
parent
b6931e3de5
commit
c715885747
2 changed files with 6 additions and 6 deletions
|
@ -17,6 +17,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
|
- [connect] Only deletes the connect state on dealer shutdown instead on disconnecting
|
||||||
- [core] Fixed a problem where in `spclient` where a http 411 error was thrown because the header were set wrong
|
- [core] Fixed a problem where in `spclient` where a http 411 error was thrown because the header were set wrong
|
||||||
|
|
||||||
### Security
|
### Security
|
||||||
|
|
|
@ -552,6 +552,11 @@ impl SpircTask {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// this should clear the active session id, leaving an empty state
|
||||||
|
if let Err(why) = self.session.spclient().delete_connect_state_request().await {
|
||||||
|
error!("error during connect state deletion: {why}")
|
||||||
|
};
|
||||||
|
|
||||||
self.session.dealer().close().await;
|
self.session.dealer().close().await;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1163,12 +1168,6 @@ impl SpircTask {
|
||||||
|
|
||||||
self.connect_state.became_inactive(&self.session).await?;
|
self.connect_state.became_inactive(&self.session).await?;
|
||||||
|
|
||||||
// this should clear the active session id, leaving an empty state
|
|
||||||
self.session
|
|
||||||
.spclient()
|
|
||||||
.delete_connect_state_request()
|
|
||||||
.await?;
|
|
||||||
|
|
||||||
self.player
|
self.player
|
||||||
.emit_session_disconnected_event(self.session.connection_id(), self.session.username());
|
.emit_session_disconnected_event(self.session.connection_id(), self.session.username());
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue