Skip to content

Commit

Permalink
SNOW-1631790-Transport-Layer - Improved readability by renaming varia…
Browse files Browse the repository at this point in the history
…bles. Fixed comments styling.
  • Loading branch information
sfc-gh-fpawlowski committed Nov 18, 2024
1 parent df6f773 commit 7725d96
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
11 changes: 5 additions & 6 deletions lib/http/node.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,15 @@ const Logger = require('../logger');
NodeHttpClient.prototype.constructExponentialBackoffStrategy = function () {
Logger.getInstance().trace('Calculating exponential backoff strategy');

// previous sleep time
let sleep = this._connectionConfig.getRetrySfStartingSleepTime();
const previousSleepTime = this._connectionConfig.getRetrySfStartingSleepTime();
// maximum seconds
const cap = this._connectionConfig.getRetrySfMaxSleepTime();
// minimum seconds
const base = 1;
sleep = Util.nextSleepTime(base, cap, sleep);
const sleepInMilliseconds = sleep * 1000;
Logger.getInstance().trace('Calculated exponential backoff strategy sleep time: %d', sleepInMilliseconds);
return sleepInMilliseconds;
const nextSleepTime = Util.nextSleepTime(base, cap, previousSleepTime);
const nextSleepTimeInMilliseconds = nextSleepTime * 1000;
Logger.getInstance().trace('Calculated exponential backoff strategy sleep time: %d', nextSleepTimeInMilliseconds);
return nextSleepTimeInMilliseconds;
};

/**
Expand Down
2 changes: 1 addition & 1 deletion lib/services/sf.js
Original file line number Diff line number Diff line change
Expand Up @@ -1256,7 +1256,7 @@ function buildLoginUrl(connectionConfig) {

const queryStringObject = {};
if (!connectionConfig.isQaMode()) {
// no requestId is attached to login-request in test mode.
// No requestId is attached to login-request in test mode.
queryStringObject.requestId = uuidv4();
}
for (let index = 0, length = queryParams.length; index < length; index++) {
Expand Down

0 comments on commit 7725d96

Please sign in to comment.