changeset 21:354dae3008de

Fix embarrassing bug that deleted sessions that were too new, rather than old
author Adam Chlipala <adam@chlipala.net>
date Sat, 08 Jan 2011 18:47:27 -0500
parents 2342d9baa0df
children 70ab0230649b
files src/ur/openidUser.ur tests/utest.ur
diffstat 2 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/ur/openidUser.ur	Thu Jan 06 16:46:09 2011 -0500
+++ b/src/ur/openidUser.ur	Sat Jan 08 18:47:27 2011 -0500
@@ -234,6 +234,6 @@
         end
 
     task periodic 60 = fn () => dml (DELETE FROM session
-                                     WHERE Expires >= CURRENT_TIMESTAMP)
+                                     WHERE Expires < CURRENT_TIMESTAMP)
 
 end
--- a/tests/utest.ur	Thu Jan 06 16:46:09 2011 -0500
+++ b/tests/utest.ur	Sat Jan 08 18:47:27 2011 -0500
@@ -18,6 +18,8 @@
                                     <tr> <th class={inputs}>Name:</th> <td><ctextbox source={r.Nam}/></td> </tr>
                                   </xml>
 
+                                  fun ready _ = return True
+
                                   fun tabulate r =
                                       n <- signal r.Nam;
                                       return {Nam = n}