Skip to content

Commit

Permalink
Merge pull request #4146 from /issues/7222
Browse files Browse the repository at this point in the history
Tokens fail to retry due to empty nonce
  • Loading branch information
tmancey committed Dec 6, 2019
2 parents 45a32e3 + f6757fb commit 1dbf7f6
Showing 1 changed file with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,19 @@ void RefillTokens::Refill(

public_key_ = public_key;

nonce_ = "";

RequestSignedTokens();
}

void RefillTokens::RetryGettingSignedTokens() {
BLOG(INFO) << "Retry getting signed tokens";

if (nonce_.empty()) {
RequestSignedTokens();
return;
}

GetSignedTokens();
}

Expand Down Expand Up @@ -309,8 +316,8 @@ void RefillTokens::OnRefill(
BLOG(ERROR) << "Failed to refill tokens";

if (should_retry) {
confirmations_->StartRetryingToGetRefillSignedTokens(
kRetryGettingRefillSignedTokensAfterSeconds);
confirmations_->StartRetryingToGetRefillSignedTokens(
kRetryGettingRefillSignedTokensAfterSeconds);
}

return;
Expand Down

0 comments on commit 1dbf7f6

Please sign in to comment.