Always assign credentials on rpc::Client after connecting
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
This commit is contained in:
co-authored by
Antonio Scandurra
parent
7d59b2d861
commit
ec7c6f3f91
+1
-1
@@ -321,7 +321,6 @@ impl Client {
|
|||||||
return Err(err);
|
return Err(err);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
self.state.write().credentials = Some(credentials.clone());
|
|
||||||
credentials
|
credentials
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -334,6 +333,7 @@ impl Client {
|
|||||||
match self.establish_connection(&credentials, cx).await {
|
match self.establish_connection(&credentials, cx).await {
|
||||||
Ok(conn) => {
|
Ok(conn) => {
|
||||||
log::info!("connected to rpc address {}", *ZED_SERVER_URL);
|
log::info!("connected to rpc address {}", *ZED_SERVER_URL);
|
||||||
|
self.state.write().credentials = Some(credentials.clone());
|
||||||
if !read_from_keychain {
|
if !read_from_keychain {
|
||||||
write_credentials_to_keychain(&credentials, cx).log_err();
|
write_credentials_to_keychain(&credentials, cx).log_err();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user