[Zodb-checkins] CVS: StandaloneZODB/ZEO - zrpc2.py:1.1.2.23
Jeremy Hylton
jeremy@zope.com
Tue, 8 Jan 2002 11:00:06 -0500
Update of /cvs-repository/StandaloneZODB/ZEO
In directory cvs.zope.org:/tmp/cvs-serv2102
Modified Files:
Tag: ZEO-ZRPC-Dev
zrpc2.py
Log Message:
If an error occurs after a successful connect(), set _thread to None
before closing the connection. This avoids a race where the
start-connect-thread-on-close code sees that there is already a thread
(the one that is about to exit with an error) and doesn't start a new
thread.
=== StandaloneZODB/ZEO/zrpc2.py 1.1.2.22 => 1.1.2.23 ===
self.obj.notifyConnected(c)
except:
+ self._thread = None
c.close()
# When the connection is closed, we'll trigger
# another attempt to reconnect.
-
finally:
# must always clear _thread on the way out
self._thread = None