fix wrong calculation of clean_session_interval stable
authorAlexandre Fayolle <alexandre.fayolle@logilab.fr>
Thu, 10 Jun 2010 17:25:38 +0200
branchstable
changeset 5721 3a9cd70bcfdc
parent 5711 ea2538a3c622
child 5729 b00cf7fbff31
fix wrong calculation of clean_session_interval
web/application.py
--- a/web/application.py	Thu Jun 10 15:11:30 2010 +0200
+++ b/web/application.py	Thu Jun 10 17:25:38 2010 +0200
@@ -59,12 +59,11 @@
         assert self.cleanup_anon_session_time > 0
         self.authmanager = vreg['components'].select('authmanager', vreg=vreg)
         if vreg.config.anonymous_user() is not None:
-            self.clean_sessions_interval = min(
-                5 * 60,
-                self.cleanup_session_time / 2.,
-                self.cleanup_anon_session_time / 2.)
+            self.clean_sessions_interval = max(
+                5 * 60, min(self.cleanup_session_time / 2.,
+                            self.cleanup_anon_session_time / 2.))
         else:
-            self.clean_sessions_interval = min(
+            self.clean_sessions_interval = max(
                 5 * 60,
                 self.cleanup_session_time / 2.)