Dolda2000 GitWeb
/
wrw.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e8aa9ce
)
Don't commit sessions to db.live before they are dirty.
author
Fredrik Tolf
<fredrik@dolda2000.com>
Wed, 21 Dec 2011 05:46:03 +0000
(06:46 +0100)
committer
Fredrik Tolf
<fredrik@dolda2000.com>
Wed, 21 Dec 2011 05:46:03 +0000
(06:46 +0100)
wrw/session.py
patch
|
blob
|
blame
|
history
diff --git
a/wrw/session.py
b/wrw/session.py
index
2abe650
..
28c1577
100644
(file)
--- a/
wrw/session.py
+++ b/
wrw/session.py
@@
-129,14
+129,15
@@
class db(object):
sess.atime = now
except KeyError:
sess = session()
- self.live[sess.id] = sess
new = True
def ckfreeze(req):
if sess.dirty():
+ if new:
+ cookie.add(req, self.cookiename, sess.id, self.path)
+ with self.lock:
+ self.live[sess.id] = sess
try:
- if new:
- cookie.add(req, self.cookiename, sess.id, self.path)
self.freeze(sess)
except:
pass