Skip to content

Commit

Permalink
Avoid retrying for 5 minutes after failed key retrieval.
Browse files Browse the repository at this point in the history
  • Loading branch information
bbockelm committed Oct 31, 2022
1 parent aec994e commit 6865e3b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/scitokens_internal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,9 @@ Validator::get_public_key_pem(const std::string &issuer, const std::string &kid,
get_public_keys_from_web(issuer, SimpleCurlGet::default_timeout, keys, next_update, expires);
store_public_keys(issuer, keys, next_update, expires);
} catch (std::runtime_error &) {
// ignore the exception: we have a valid set of keys already/
// ignore the exception: we have a valid set of keys already. However, we don't want to continuously
// hammer the upstream server which is not currently working ... move forward the next_update by 5 minutes.
store_public_keys(issuer, keys, now + 300, expires);
}
}
} else {
Expand Down

0 comments on commit 6865e3b

Please sign in to comment.