-
Notifications
You must be signed in to change notification settings - Fork 663
core: disconnect clients #3275
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
core: disconnect clients #3275
Conversation
a6e35ec to
ec9f02a
Compare
3a0e6bd to
49cfb51
Compare
16f51b1 to
068d84f
Compare
gefjon
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
|
How does |
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>
I fixed |
# 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>
# 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>
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.