Skip to content

Commit c715885

Browse files
authored
Fix: Delete the connect state only on spirc shutdown (#1555)
* fix: only delete the state on shutdown * chore: update changelog
1 parent b6931e3 commit c715885

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1717

1818
### Fixed
1919

20+
- [connect] Only deletes the connect state on dealer shutdown instead on disconnecting
2021
- [core] Fixed a problem where in `spclient` where a http 411 error was thrown because the header were set wrong
2122

2223
### Security

connect/src/spirc.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -552,6 +552,11 @@ impl SpircTask {
552552
}
553553
}
554554

555+
// this should clear the active session id, leaving an empty state
556+
if let Err(why) = self.session.spclient().delete_connect_state_request().await {
557+
error!("error during connect state deletion: {why}")
558+
};
559+
555560
self.session.dealer().close().await;
556561
}
557562

@@ -1163,12 +1168,6 @@ impl SpircTask {
11631168

11641169
self.connect_state.became_inactive(&self.session).await?;
11651170

1166-
// this should clear the active session id, leaving an empty state
1167-
self.session
1168-
.spclient()
1169-
.delete_connect_state_request()
1170-
.await?;
1171-
11721171
self.player
11731172
.emit_session_disconnected_event(self.session.connection_id(), self.session.username());
11741173

0 commit comments

Comments
 (0)