# HG changeset patch # User Sylvain Thénault # Date 1247031881 -7200 # Node ID 654decb099e34167750cdda77781c4048ecc7143 # Parent a1849f3ef4af4a53e19cb9ef5ae3120c728c56a5 typo, no error if thread isn't in running set diff -r a1849f3ef4af -r 654decb099e3 server/session.py --- a/server/session.py Tue Jul 07 14:29:09 2009 +0200 +++ b/server/session.py Wed Jul 08 07:44:41 2009 +0200 @@ -146,13 +146,16 @@ return self._threaddata.pool def reset_pool(self): - """the session has no longer using its pool, at least for some time""" + """the session is no longer using its pool, at least for some time""" # pool may be none if no operation has been done since last commit # or rollback if self.pool is not None and self.mode == 'read': # even in read mode, we must release the current transaction pool = self.pool - self._threads_in_transaction.remove(threading.currentThread()) + try: + self._threads_in_transaction.remove(threading.currentThread()) + except KeyError: + pass pool.pool_reset() self._threaddata.pool = None # free pool once everything is done to avoid race-condition