Skip to content

Commit

Permalink
Clean up
Browse files Browse the repository at this point in the history
Signed-off-by: Gavin Halliday <[email protected]>
  • Loading branch information
ghalliday committed Nov 22, 2023
1 parent 705667d commit c692f35
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions system/jlib/jsecrets.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@

//#define TRACE_SECRETS
#include <vector>
#include <type_traits>

enum class CVaultKind { kv_v1, kv_v2 };

Expand Down Expand Up @@ -415,7 +414,7 @@ static void expandSecretKey(std::string & category, std::string & name, std::str

//Represents an entry in the secret cache. Once created it is always used for the secret.
using cache_timestamp = unsigned;
using cache_timestamp_diff = signed;//std::make_signed<cache_timestamp>;
using cache_timestamp_diff = signed;
class SecretCacheEntry : public CInterface
{
friend class SecretCache;
Expand Down Expand Up @@ -1346,12 +1345,16 @@ class SecretRefreshThread : public Thread
std::vector<SecretCacheEntry *> pending;
while (!abort)
{
#ifdef TRACE_SECRETS
DBGLOG("Check for expired secrets...");
#endif
cache_timestamp now = msTick();
globalSecretCache.gatherPendingRefresh(pending, now + refreshLookaheadMs);
for (auto secret : pending)
{
#ifdef TRACE_SECRETS
DBGLOG("Refreshing secret %s", secret->queryTraceName());
#endif
refreshSecret(secret, false);
}
pending.clear();
Expand Down

0 comments on commit c692f35

Please sign in to comment.