mirror of
https://gitlab.com/veilid/veilid.git
synced 2024-11-25 10:10:41 -06:00
allow returning local values when offline, even when forcerefresh is turned on
This commit is contained in:
parent
765ecee450
commit
2dee3ff6cc
@ -309,6 +309,10 @@ impl StorageManager {
|
||||
|
||||
// Get rpc processor and drop mutex so we don't block while getting the value from the network
|
||||
let Some(rpc_processor) = inner.rpc_processor.clone() else {
|
||||
// Return the existing value if we have one if we aren't online
|
||||
if let Some(last_subkey_result_value) = last_subkey_result.value {
|
||||
return Ok(Some(last_subkey_result_value.into_value_data()));
|
||||
}
|
||||
apibail_try_again!("offline, try again later");
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user