[Zodb-checkins] CVS: Packages/ZEO - zrpc.py:1.17
jeremy@digicool.com
jeremy@digicool.com
Tue, 22 May 2001 14:05:43 -0400 (EDT)
Update of /cvs-repository/Packages/ZEO
In directory korak.digicool.com:/tmp/cvs-serv7551
Modified Files:
zrpc.py
Log Message:
Add __closed attribute to asyncRPC object.
__init__(): __closed = 0
connect(): In connecting thread, don't continue if __closed is true.
close(): __closed = 1
--- Updated File zrpc.py in package Packages/ZEO --
--- zrpc.py 2001/05/09 18:27:24 1.16
+++ zrpc.py 2001/05/22 18:05:43 1.17
@@ -117,6 +117,7 @@
self._outOfBand=outOfBand
self._tmin, self._tmax = tmin, tmax
self._debug=debug
+ self.__closed = 0
l=allocate_lock() # Response lock used to wait for call results
self.__la=l.acquire
@@ -132,7 +133,7 @@
t=self._tmin
connection = self._connection
debug=self._debug
- while 1:
+ while self.__closed == 0:
if log_type: LOG(log_type, INFO,
'Trying to connect to server: %s' % `connection`)
try:
@@ -292,5 +293,6 @@
asyncRPC.inheritedAttribute('close')(self)
self.aq_parent.notifyDisconnected(self)
self.__r='E'+dump(sys.exc_info()[:2], 1)
+ self.__closed = 1
try: self.__lr()
except: pass