diff --git a/CHANGELOG.md b/CHANGELOG.md index e0dd8713..27bb7de8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### 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 ### Security diff --git a/connect/src/spirc.rs b/connect/src/spirc.rs index e3d56c5e..6bb9685b 100644 --- a/connect/src/spirc.rs +++ b/connect/src/spirc.rs @@ -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; } @@ -1163,12 +1168,6 @@ impl SpircTask { 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 .emit_session_disconnected_event(self.session.connection_id(), self.session.username());