Skip to content

Commit 6865e3b

Browse files
committed
Avoid retrying for 5 minutes after failed key retrieval.
1 parent aec994e commit 6865e3b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/scitokens_internal.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -584,7 +584,9 @@ Validator::get_public_key_pem(const std::string &issuer, const std::string &kid,
584584
get_public_keys_from_web(issuer, SimpleCurlGet::default_timeout, keys, next_update, expires);
585585
store_public_keys(issuer, keys, next_update, expires);
586586
} catch (std::runtime_error &) {
587-
// ignore the exception: we have a valid set of keys already/
587+
// ignore the exception: we have a valid set of keys already. However, we don't want to continuously
588+
// hammer the upstream server which is not currently working ... move forward the next_update by 5 minutes.
589+
store_public_keys(issuer, keys, now + 300, expires);
588590
}
589591
}
590592
} else {

0 commit comments

Comments
 (0)