Ensure client reconnects after erroring during the handshake (#31278)
Release Notes: - Fixed a bug that prevented Zed from reconnecting after erroring during the initial handshake with the server.
This commit is contained in:
parent
03ac3fb91a
commit
9dba8e5b0d
5 changed files with 79 additions and 14 deletions
|
@ -905,7 +905,15 @@ impl Client {
|
|||
}
|
||||
|
||||
futures::select_biased! {
|
||||
result = self.set_connection(conn, cx).fuse() => ConnectionResult::Result(result.context("client auth and connect")),
|
||||
result = self.set_connection(conn, cx).fuse() => {
|
||||
match result.context("client auth and connect") {
|
||||
Ok(()) => ConnectionResult::Result(Ok(())),
|
||||
Err(err) => {
|
||||
self.set_status(Status::ConnectionError, cx);
|
||||
ConnectionResult::Result(Err(err))
|
||||
},
|
||||
}
|
||||
},
|
||||
_ = timeout => {
|
||||
self.set_status(Status::ConnectionError, cx);
|
||||
ConnectionResult::Timeout
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue