scitokens / scitokens-cpp

A C++ implementation of the SciTokens library with a C library interface
Apache License 2.0
5 stars 22 forks source link

Shorten timeout for public key download #100

Closed bbockelm closed 1 year ago

bbockelm commented 1 year ago

While the public key download can fail and have the library fall back on the cached copy, this fallback can take such a long time that the application code (such as the HTCondor-CE) invoking the library times out its current operation and still failing.

So, without this, the fallback succeeds but everything else fails due to timeouts.

For now, we have arbitrarily set the timeout to 30s for the case where the pubkey has expired and 4s for the update check.

bbockelm commented 1 year ago

A related fix is https://github.com/scitokens/scitokens-cpp/pull/103 which ensures that the library will backoff even with the shorter timeout.