Ensure client always responds when receiving a request
This commit is contained in:
parent
a41eb5a663
commit
a19735c05f
4 changed files with 519 additions and 557 deletions
|
@ -60,9 +60,9 @@ impl UserStore {
|
|||
watch::channel::<Option<proto::UpdateContacts>>();
|
||||
let update_contacts_subscription = client.subscribe(
|
||||
cx,
|
||||
move |_: &mut Self, msg: TypedEnvelope<proto::UpdateContacts>, _, _| {
|
||||
let _ = update_contacts_tx.blocking_send(Some(msg.payload));
|
||||
Ok(())
|
||||
move |_: ModelHandle<Self>, msg: TypedEnvelope<proto::UpdateContacts>, _, _| {
|
||||
*update_contacts_tx.borrow_mut() = Some(msg.payload);
|
||||
async move { Ok(()) }
|
||||
},
|
||||
);
|
||||
Self {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue