[Zodb-checkins] CVS: ZODB3/ZODB - Connection.py:1.76.4.7

Jeremy Hylton jeremy at zope.com
Wed Aug 27 12:31:45 EDT 2003


Update of /cvs-repository/ZODB3/ZODB
In directory cvs.zope.org:/tmp/cvs-serv5706

Modified Files:
      Tag: ZODB3-3_1-branch
	Connection.py 
Log Message:
Port Anthony's fix for _incrgc problems from Zope-2_6-branch.


=== ZODB3/ZODB/Connection.py 1.76.4.6 => 1.76.4.7 ===
--- ZODB3/ZODB/Connection.py:1.76.4.6	Mon Jun  9 14:34:06 2003
+++ ZODB3/ZODB/Connection.py	Wed Aug 27 11:31:44 2003
@@ -127,6 +127,7 @@
         except: pass
         try: del self._incrgc
         except: pass
+        self._incrgc = None
         try: del self.cacheGC
         except: pass
 
@@ -270,7 +271,9 @@
         self.__onCloseCallbacks.append(f)
 
     def close(self):
-        self._incrgc() # This is a good time to do some GC
+        # Don't bother if _breakcr has already been called (e.g. at shutdown)
+        if self._incrgc is not None:
+            self._incrgc() # This is a good time to do some GC
 
         # Call the close callbacks.
         if self.__onCloseCallbacks is not None:




More information about the Zodb-checkins mailing list