diff options
| author | Vo Minh Thu <vmt@openerp.com> | 2012-01-18 11:12:52 +0100 |
|---|---|---|
| committer | Vo Minh Thu <vmt@openerp.com> | 2012-01-18 11:12:52 +0100 |
| commit | 75b3fc0907ee873c6e16d1fa8e8bfe58d4f520c1 (patch) | |
| tree | 3e7f7bbe9110eeae766b46bb9c16a867579b6452 /addons/web/common/http.py | |
| parent | 3203d264aecd751a8c261cea4f72fa323a3098be (diff) | |
| parent | 152f92916bc36d00c0e59fbc49fb655a4fd85908 (diff) | |
[MERGE] merged trunk.
bzr revid: vmt@openerp.com-20120118101252-e81nlyzym2nkebf4
Diffstat (limited to 'addons/web/common/http.py')
| -rw-r--r-- | addons/web/common/http.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/addons/web/common/http.py b/addons/web/common/http.py index 17ccfb63d8a..434edf5e3a7 100644 --- a/addons/web/common/http.py +++ b/addons/web/common/http.py @@ -328,6 +328,7 @@ def session_context(request, storage_path, session_cookie='sessionid'): # Remove all OpenERPSession instances with no uid, they're generated # either by login process or by HTTP requests without an OpenERP # session id, and are generally noise + removed_sessions = [] for key, value in request.session.items(): if (isinstance(value, session.OpenERPSession) and not value._uid @@ -335,6 +336,7 @@ def session_context(request, storage_path, session_cookie='sessionid'): and value._creation_time + (60*5) < time.time() # FIXME do not use a fixed value ): _logger.debug('remove session %s', key) + removed_sessions.append(key) del request.session[key] with session_lock: @@ -364,7 +366,7 @@ def session_context(request, storage_path, session_cookie='sessionid'): # add missing keys for k, v in in_store.iteritems(): - if k not in request.session: + if k not in request.session and k not in removed_sessions: request.session[k] = v session_store.save(request.session) |
