Skip to content

Commit 84cc440

Browse files
authored
Fix token refresh conditions (#21)
Tokens would get refreshed if expiry was before current time, this is inverted from what we want...
2 parents a201ccb + ed03770 commit 84cc440

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/obelisk/asynchronous/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ async def _verify_token(self) -> None:
9999
if (
100100
self._token is None
101101
or self._token_expires is None
102-
or self._token_expires < (datetime.now() - self.grace_period)
102+
or self._token_expires >= (datetime.now() - self.grace_period)
103103
):
104104
retry = self.retry_strategy.make()
105105
first = True

0 commit comments

Comments
 (0)