Respond to join project request before sharing project completes

This ensures the guest doesn't observe a huge delay when joining.
This commit is contained in:
Antonio Scandurra 2022-06-30 14:29:06 +02:00
parent 09bb3ddeb8
commit 845c79ee05
2 changed files with 6 additions and 7 deletions

View file

@ -1332,12 +1332,13 @@ impl Project {
let client = self.client.clone();
cx.foreground()
.spawn(async move {
share.await?;
client.send(proto::RespondToJoinProjectRequest {
requester_id,
project_id,
allow,
})
})?;
share.await?;
anyhow::Ok(())
})
.detach_and_log_err(cx);
}