Skip to content

Commit 463fbe3

Browse files
committed
improve comments, remove unused import
1 parent bf399e6 commit 463fbe3

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/libs/Middleware/Reauthentication.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import Onyx from 'react-native-onyx';
21
import redirectToSignIn from '@libs/actions/SignInRedirect';
32
import * as Authentication from '@libs/Authentication';
43
import Log from '@libs/Log';
@@ -48,8 +47,12 @@ function retryReauthenticate(commandName?: string): Promise<void> {
4847
});
4948
}
5049

50+
// Used in tests to reset the reauthentication state
5151
function resetReauthentication(): void {
52+
// Resets the authentication state flag to allow new reauthentication flows to start fresh
5253
isAuthenticating = null;
54+
55+
// Clears any pending reauth timeouts set by reauthThrottle.sleep()
5356
reauthThrottle.clear();
5457
}
5558

src/libs/RequestThrottle.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class RequestThrottle {
2424
clearTimeout(this.timeoutID);
2525
this.timeoutID = undefined;
2626
}
27-
Log.info(`[RequestThrottle - ${this.name}] in clear()`);
27+
Log.info(`[RequestThrottle - ${this.name}] cleared`);
2828
}
2929

3030
getRequestWaitTime() {

0 commit comments

Comments
 (0)