core: disconnect clients #3275
Merged
Merged
Conversation
a6e35ec to
ec9f02a
Compare
Shubham8287
commented
Sep 23, 2025
Centril
reviewed
Sep 24, 2025
3a0e6bd to
49cfb51
Compare
16f51b1 to
068d84f
Compare
gefjon
previously approved these changes
Sep 25, 2025
Contributor
gefjon
left a comment
There was a problem hiding this comment.
Excellent, thanks! This seems like the correct way to disconnect clients.
Actually, I realized I'm not confident that we correctly call the client_disconnected reducers here.
Contributor
|
How does |
Contributor
Author
Dropping client.disconnect() imeplementation calls ModuleHost::disconnect_client() which does the job.
|
Co-authored-by: Phoebe Goldman <phoebe@clockworklabs.io> Signed-off-by: Shubham Mishra <shivam828787@gmail.com>
Contributor
Author
I fixed |
gefjon
reviewed
Sep 26, 2025
gefjon
reviewed
Sep 29, 2025
gefjon
approved these changes
Sep 29, 2025
bfops
pushed a commit
that referenced
this pull request
Oct 8, 2025
# Description of Changes The `AutoMigrateStep::DisconnectAllUsers` step is implemented as follows: 1. The `spacetimedb::db::update::update_database` function returns a response of type `UpdateDatabaseResult::UpdatePerformedWithClientDisconnect`. 2. Upon receiving this response, the `host_controller::update_module` proceeds to drop the `watch::Sender<ModuleHost>` field within the `core::host_controller::Host` and disconnect clients. # API and ABI breaking changes NA # Expected complexity level and risk 3. Diff code is simple but It depends on the subcription logic to behave correctly. # Testing Manually. --------- Signed-off-by: Shubham Mishra <shivam828787@gmail.com> Co-authored-by: Phoebe Goldman <phoebe@clockworklabs.io>
bfops
pushed a commit
that referenced
this pull request
Oct 8, 2025
# Description of Changes The `AutoMigrateStep::DisconnectAllUsers` step is implemented as follows: 1. The `spacetimedb::db::update::update_database` function returns a response of type `UpdateDatabaseResult::UpdatePerformedWithClientDisconnect`. 2. Upon receiving this response, the `host_controller::update_module` proceeds to drop the `watch::Sender<ModuleHost>` field within the `core::host_controller::Host` and disconnect clients. # API and ABI breaking changes NA # Expected complexity level and risk 3. Diff code is simple but It depends on the subcription logic to behave correctly. # Testing Manually. --------- Signed-off-by: Shubham Mishra <shivam828787@gmail.com> Co-authored-by: Phoebe Goldman <phoebe@clockworklabs.io>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of Changes
The
AutoMigrateStep::DisconnectAllUsersstep is implemented as follows:The
spacetimedb::db::update::update_databasefunction returns a response of typeUpdateDatabaseResult::UpdatePerformedWithClientDisconnect.Upon receiving this response, the
host_controller::update_moduleproceeds to drop thewatch::Sender<ModuleHost>field within thecore::host_controller::Hostand disconnect clients.companion private PR - https://github.com/clockworklabs/SpacetimeDBPrivate/pull/2095
API and ABI breaking changes
NA
Expected complexity level and risk
Diff code is simple but It depends on the subcription logic to behave correctly.
Testing
Manually.