Skip to content

Commit

Permalink
fix: variable rename
Browse files Browse the repository at this point in the history
  • Loading branch information
kuhe committed Feb 26, 2024
1 parent f875745 commit 344d13b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
5 changes: 5 additions & 0 deletions .changeset/rude-apricots-remember.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@smithy/core": patch
---

restore retry made after system clock skew correction
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export const httpSigningMiddleware = <Input extends object, Output extends objec
identity,
signer,
} = scheme;
const lastSystemClockOffset = config.systemClockOffset | 0;
const initialSystemClockOffset = config.systemClockOffset | 0;

const makeSignedRequest = async () =>
next({
Expand All @@ -86,14 +86,14 @@ export const httpSigningMiddleware = <Input extends object, Output extends objec
thrownError = e;
}
const latestSystemClockOffset = config.systemClockOffset | 0;
const systemClockOffsetModified = lastSystemClockOffset !== latestSystemClockOffset;
const systemClockOffsetWasModified = initialSystemClockOffset !== latestSystemClockOffset;

if (systemClockOffsetModified) {
if (systemClockOffsetWasModified) {
return makeSignedRequest().catch(onError);
} else {
if (thrownError) {
throw thrownError;
}
}

if (thrownError) {
throw thrownError;
}
});
onSuccess(output.response, signingProperties);
Expand Down

0 comments on commit 344d13b

Please sign in to comment.