Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3372786
D9871.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
680 B
Referenced Files
None
Subscribers
None
D9871.diff
View Options
diff --git a/keyserver/src/push/providers.js b/keyserver/src/push/providers.js
--- a/keyserver/src/push/providers.js
+++ b/keyserver/src/push/providers.js
@@ -154,11 +154,12 @@
let wnsAccessToken: ?WNSAccessToken = null;
async function getWNSToken(): Promise<?string> {
const expiryWindowInMs = 10_000;
+ const localWNSAccessToken = wnsAccessToken;
if (
- wnsAccessToken &&
- wnsAccessToken.expires >= Date.now() - expiryWindowInMs
+ localWNSAccessToken &&
+ localWNSAccessToken.expires >= Date.now() - expiryWindowInMs
) {
- return wnsAccessToken.token;
+ return localWNSAccessToken.token;
}
const config = await getCommConfig<WNSConfig>({
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Nov 27, 7:54 AM (21 h, 14 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2589471
Default Alt Text
D9871.diff (680 B)
Attached To
Mode
D9871: [Flow202][keyserver][skip-ci] [22/x] Address type errors with getWNSToken
Attached
Detach File
Event Timeline
Log In to Comment