src/client/http_client.rs: do not store fingerprints passed via options in cache

This commit is contained in:
Dietmar Maurer 2020-02-11 11:54:43 +01:00
parent 1bd6f32b43
commit a6e3da987c

View File

@ -250,7 +250,11 @@ impl HttpClient {
let verified_fingerprint = Arc::new(Mutex::new(None)); let verified_fingerprint = Arc::new(Mutex::new(None));
let mut fingerprint = options.fingerprint.take(); let mut fingerprint = options.fingerprint.take();
if options.fingerprint_cache && fingerprint.is_none() && options.prefix.is_some() {
if fingerprint.is_some() {
// do not store fingerprints passed via options in cache
options.fingerprint_cache = false;
} else if options.fingerprint_cache && options.prefix.is_some() {
fingerprint = load_fingerprint(options.prefix.as_ref().unwrap(), server); fingerprint = load_fingerprint(options.prefix.as_ref().unwrap(), server);
} }