mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-10-01 08:25:44 -04:00
Use hs get_clock instead of time.time()
This commit is contained in:
parent
f5e90422f5
commit
742b6c6d15
@ -36,7 +36,7 @@ logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class AuthHandler(BaseHandler):
|
||||
SESSION_EXPIRE_SECS = 48 * 60 * 60
|
||||
SESSION_EXPIRE_MS = 48 * 60 * 60 * 1000
|
||||
|
||||
def __init__(self, hs):
|
||||
super(AuthHandler, self).__init__(hs)
|
||||
@ -494,7 +494,7 @@ class AuthHandler(BaseHandler):
|
||||
last_used = 0
|
||||
if 'last_used' in sess:
|
||||
last_used = sess['last_used']
|
||||
if last_used < time.time() - AuthHandler.SESSION_EXPIRE_SECS:
|
||||
if last_used < self.hs.get_clock().time() - AuthHandler.SESSION_EXPIRE_MS:
|
||||
del self.sessions[sid]
|
||||
|
||||
def hash(self, password):
|
||||
|
Loading…
Reference in New Issue
Block a user