Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions crates/core/src/host/module_host.rs
Original file line number Diff line number Diff line change
Expand Up @@ -501,12 +501,11 @@ impl ModuleHost {
}

pub async fn disconnect_client(&self, client_id: ClientActorId) {
tokio::join!(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, it looks like they were never really concurrent anyway. I don't know why I thought they were; remove_subscriber is not an async function.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lol, anyway this doesn't solve the deadlock, but anyway we can merge it?

async { self.subscriptions().remove_subscriber(client_id) },
self.call_identity_connected_disconnected(client_id.identity, client_id.address, false)
// ignore NoSuchModule; if the module's already closed, that's fine
.map(drop)
);
self.subscriptions().remove_subscriber(client_id);
// ignore NoSuchModule; if the module's already closed, that's fine
let _ = self
.call_identity_connected_disconnected(client_id.identity, client_id.address, false)
.await;
}

pub async fn call_identity_connected_disconnected(
Expand Down