From c715885747a95ec22f9502825cb0d2d8833c3779 Mon Sep 17 00:00:00 2001 From: Felix Prillwitz Date: Wed, 27 Aug 2025 11:18:02 +0200 Subject: [PATCH] Fix: Delete the connect state only on spirc shutdown (#1555) * fix: only delete the state on shutdown * chore: update changelog --- CHANGELOG.md | 1 + connect/src/spirc.rs | 11 +++++------ 2 files changed, 6 insertions(+), 6 deletions(-) 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());