Separate timeout and connection dropped errors out (#30457)

This commit is contained in:
Kirill Bulatov 2025-05-10 15:12:58 +03:00 committed by GitHub
parent 39da72161f
commit 471e02d48f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
25 changed files with 313 additions and 115 deletions

View file

@ -42,6 +42,7 @@ futures.workspace = true
fuzzy.workspace = true
gpui.workspace = true
language.workspace = true
log.workspace = true
menu.workspace = true
notifications.workspace = true
picker.workspace = true

View file

@ -2227,6 +2227,7 @@ impl CollabPanel {
client
.authenticate_and_connect(true, &cx)
.await
.into_response()
.notify_async_err(cx);
})
.detach()

View file

@ -646,10 +646,20 @@ impl Render for NotificationPanel {
let client = client.clone();
window
.spawn(cx, async move |cx| {
client
match client
.authenticate_and_connect(true, &cx)
.log_err()
.await;
.await
{
util::ConnectionResult::Timeout => {
log::error!("Connection timeout");
}
util::ConnectionResult::ConnectionReset => {
log::error!("Connection reset");
}
util::ConnectionResult::Result(r) => {
r.log_err();
}
}
})
.detach()
}