Skip to content

Commit ed03770

Browse files
committed
Fix token refresh conditions
Tokens would get refreshed if expiry was before current time, this is inverted from what we want...
1 parent a201ccb commit ed03770

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)