http-client: fix typoed ticket cache condition
which was even copy-pasted once without noticing. found with clippy. Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com> Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
parent
d08cff51a4
commit
dbd00a57b0
|
@ -351,7 +351,7 @@ impl HttpClient {
|
||||||
};
|
};
|
||||||
match Self::credentials(client2.clone(), server2.clone(), port, auth_id.user().clone(), ticket).await {
|
match Self::credentials(client2.clone(), server2.clone(), port, auth_id.user().clone(), ticket).await {
|
||||||
Ok(auth) => {
|
Ok(auth) => {
|
||||||
if use_ticket_cache & &prefix2.is_some() {
|
if use_ticket_cache && prefix2.is_some() {
|
||||||
let _ = store_ticket_info(prefix2.as_ref().unwrap(), &server2, &auth.auth_id.to_string(), &auth.ticket, &auth.token);
|
let _ = store_ticket_info(prefix2.as_ref().unwrap(), &server2, &auth.auth_id.to_string(), &auth.ticket, &auth.token);
|
||||||
}
|
}
|
||||||
*auth2.write().unwrap() = auth;
|
*auth2.write().unwrap() = auth;
|
||||||
|
@ -378,7 +378,7 @@ impl HttpClient {
|
||||||
let authinfo = auth.clone();
|
let authinfo = auth.clone();
|
||||||
|
|
||||||
move |auth| {
|
move |auth| {
|
||||||
if use_ticket_cache & &prefix.is_some() {
|
if use_ticket_cache && prefix.is_some() {
|
||||||
let _ = store_ticket_info(prefix.as_ref().unwrap(), &server, &auth.auth_id.to_string(), &auth.ticket, &auth.token);
|
let _ = store_ticket_info(prefix.as_ref().unwrap(), &server, &auth.auth_id.to_string(), &auth.ticket, &auth.token);
|
||||||
}
|
}
|
||||||
*authinfo.write().unwrap() = auth;
|
*authinfo.write().unwrap() = auth;
|
||||||
|
|
Loading…
Reference in New Issue