summary refs log tree commit diff
path: root/synapse/handlers/auth.py
diff options
context:
space:
mode:
authorDavid Baker <dave@matrix.org>2016-03-16 16:22:20 +0000
committerDavid Baker <dave@matrix.org>2016-03-16 16:22:20 +0000
commitb58d10a87595bd64305f46c2ac86252a67d7b0e4 (patch)
tree164fa81b554a0f4a425024b1f11907083fbb137a /synapse/handlers/auth.py
parenttime_msec() (diff)
downloadsynapse-b58d10a87595bd64305f46c2ac86252a67d7b0e4.tar.xz
pep8
Diffstat (limited to 'synapse/handlers/auth.py')
-rw-r--r--synapse/handlers/auth.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/synapse/handlers/auth.py b/synapse/handlers/auth.py
index cdf9e9000c..d7233cd0d6 100644
--- a/synapse/handlers/auth.py
+++ b/synapse/handlers/auth.py
@@ -493,7 +493,8 @@ class AuthHandler(BaseHandler):
             last_used = 0
             if 'last_used' in sess:
                 last_used = sess['last_used']
-            if last_used < self.hs.get_clock().time_msec() - AuthHandler.SESSION_EXPIRE_MS:
+            now = self.hs.get_clock().time_msec()
+            if last_used < now - AuthHandler.SESSION_EXPIRE_MS:
                 del self.sessions[sid]
 
     def hash(self, password):