Skip to content

Commit 9183d9a

Browse files
committed
Increase threshold for expired tokens.
1 parent 253b27d commit 9183d9a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

twitchio/authentication/tokens.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ async def _revalidate_all(self) -> None:
271271
self._tokens[user_id]["last_validated"] = datetime.datetime.now().isoformat()
272272

273273
expires_in: int = valid_resp["expires_in"]
274-
if expires_in <= 60:
274+
if expires_in <= 300:
275275
logger.debug('Token for "%s" expires in %s seconds. Attempting to refresh token.', user_id, expires_in)
276276

277277
await self._refresh_token(user_id, refresh)

0 commit comments

Comments
 (0)