protocol/service: defensive storage.contains check
In the case of the `storage.contains` call returning an error, it would be preferable to log the error and continue checking for missing repositories.
This commit is contained in:
parent
a46f8eb1d5
commit
47dc2c562c
|
|
@ -2530,8 +2530,16 @@ where
|
|||
if !policy.is_allow() {
|
||||
continue;
|
||||
}
|
||||
if self.storage.contains(&rid)? {
|
||||
continue;
|
||||
match self.storage.contains(&rid) {
|
||||
Ok(exists) => {
|
||||
if exists {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
Err(err) => {
|
||||
log::warn!(target: "protocol::filter", "Failed to check if {rid} exists: {err}");
|
||||
continue;
|
||||
}
|
||||
}
|
||||
match self.seeds(&rid, [self.node_id()].into()) {
|
||||
Ok(seeds) => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue