summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
Diffstat (limited to 'synapse')
-rw-r--r--synapse/handlers/auth.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/handlers/auth.py b/synapse/handlers/auth.py
index a9f5e3710b..dba6c76dfc 100644
--- a/synapse/handlers/auth.py
+++ b/synapse/handlers/auth.py
@@ -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):