From 9e56885a9f6d71d686f3afb65750d5fae967c024 Mon Sep 17 00:00:00 2001 From: user2 Date: Wed, 8 Dec 2021 18:36:29 +0300 Subject: [PATCH] fix prev commit --- capi/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/capi/__init__.py b/capi/__init__.py index a0aac98..9c6bbb6 100644 --- a/capi/__init__.py +++ b/capi/__init__.py @@ -125,7 +125,7 @@ class CAPIAuthorizer: msg['state'] = state - if int(time.time()) < int(row['timestamp_got_expires_in']) + int(row['expires_in'] - 400) and not force_refresh: + if int(time.time()) < int(row['timestamp_got_expires_in']) + int(row['expires_in']) - 400 and not force_refresh: # current time < when we got token + token lifetime - 400, 400 is need just to refresh token on 400 secs # earlier than lifetime stated by FDEV, for safe msg['status'] = 'ok'