Download Install Tutorial Docs FAQ Tools WikiLicense Team IRC Planet Involvement Shop Book

Changeset 1162

Show
Ignore:
Timestamp:
06/25/06 23:15:51
Author:
fumanchu
Message:

Fix for #475 (double calling acquire_lock() freezes the request).

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/cherrypy/lib/sessions.py

    r1161 r1162  
    236236     
    237237    def acquire_lock(self): 
    238         file_path = self._get_file_path(cherrypy.session.id) 
    239         self._lock_file(file_path + self.LOCK_SUFFIX) 
    240         cherrypy.request._session.locked = True 
     238        if not cherrypy.request._session.locked: 
     239            file_path = self._get_file_path(cherrypy.session.id) 
     240            self._lock_file(file_path + self.LOCK_SUFFIX) 
     241            cherrypy.request._session.locked = True 
    241242     
    242243    def release_lock(self): 

Hosted by WebFaction

Log in as guest/cpguest to create tickets