diff --git a/src/api/controllers/chat.ts b/src/api/controllers/chat.ts index 9306339..1e44bdb 100644 --- a/src/api/controllers/chat.ts +++ b/src/api/controllers/chat.ts @@ -102,8 +102,10 @@ async function acquireToken(refreshToken: string): Promise { result = await requestToken(refreshToken); accessTokenMap.set(refreshToken, result); } - if (util.unixTimestamp() > result.refreshTime) + if (util.unixTimestamp() > result.refreshTime) { result = await requestToken(refreshToken); + accessTokenMap.set(refreshToken, result); + } return result.accessToken; }