[Zodb-checkins] CVS: ZODB3/bsddb3Storage/bsddb3Storage - BerkeleyBase.py:1.28

Barry Warsaw barry@wooz.org
Mon, 25 Nov 2002 10:37:42 -0500


Update of /cvs-repository/ZODB3/bsddb3Storage/bsddb3Storage
In directory cvs.zope.org:/tmp/cvs-serv9496

Modified Files:
	BerkeleyBase.py 
Log Message:
__init__(), close(): Add a _closed flag so we don't try to enter
_doclose() twice (runsvr.py had a bug that caused the storages to be
closed twice).


=== ZODB3/bsddb3Storage/bsddb3Storage/BerkeleyBase.py 1.27 => 1.28 ===
--- ZODB3/bsddb3Storage/bsddb3Storage/BerkeleyBase.py:1.27	Fri Nov 22 17:26:07 2002
+++ ZODB3/bsddb3Storage/bsddb3Storage/BerkeleyBase.py	Mon Nov 25 10:37:41 2002
@@ -190,7 +190,7 @@
         # Instantiate a pack lock
         self._packlock = ThreadLock.allocate_lock()
         self._autopacker = None
-        self._stop = False
+        self._stop = self._closed = False
         # Initialize a few other things
         self._prefix = prefix
         # Give the subclasses a chance to interpose into the database setup
@@ -316,7 +316,9 @@
         self._stop = True
         self._lock_acquire()
         try:
-            self._doclose()
+            if not self._closed:
+                self._doclose()
+                self._closed = True
         finally:
             self._lock_release()