mirror of
https://github.com/zed-industries/zed.git
synced 2024-12-26 10:40:54 +00:00
Decrement pending_contact_requests even if a request fails
This commit is contained in:
parent
2aec4ff234
commit
d7cba73ead
1 changed files with 4 additions and 3 deletions
|
@ -322,10 +322,10 @@ impl UserStore {
|
|||
cx.notify();
|
||||
|
||||
cx.spawn(|this, mut cx| async move {
|
||||
let request = client
|
||||
let response = client
|
||||
.ok_or_else(|| anyhow!("can't upgrade client reference"))?
|
||||
.request(request);
|
||||
request.await?;
|
||||
.request(request)
|
||||
.await;
|
||||
this.update(&mut cx, |this, cx| {
|
||||
if let Entry::Occupied(mut request_count) =
|
||||
this.pending_contact_requests.entry(user_id)
|
||||
|
@ -337,6 +337,7 @@ impl UserStore {
|
|||
}
|
||||
cx.notify();
|
||||
});
|
||||
response?;
|
||||
Ok(())
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue