[Zope-Checkins] CVS: Zope/lib/python/ZEO/zrpc - trigger.py:1.8.18.1
Barry Warsaw
barry@wooz.org
Fri, 1 Nov 2002 17:59:44 -0500
Update of /cvs-repository/Zope/lib/python/ZEO/zrpc
In directory cvs.zope.org:/tmp/cvs-serv18802
Modified Files:
Tag: ZODB3-deadlock-debug-branch
trigger.py
Log Message:
close(): After closing all the fds, set self._fd to the empty list, so
we can't accidentally close them twice.
=== Zope/lib/python/ZEO/zrpc/trigger.py 1.8 => 1.8.18.1 ===
--- Zope/lib/python/ZEO/zrpc/trigger.py:1.8 Wed Oct 2 14:37:17 2002
+++ Zope/lib/python/ZEO/zrpc/trigger.py Fri Nov 1 17:59:44 2002
@@ -17,6 +17,7 @@
import socket
import string
import thread
+import errno
if os.name == 'posix':
@@ -72,6 +73,7 @@
self.del_channel()
for fd in self._fds:
os.close(fd)
+ self._fds = []
def __repr__(self):
return '<select-trigger (pipe) at %x>' % id(self)
@@ -84,6 +86,9 @@
def handle_connect(self):
pass
+
+ def handle_close(self):
+ self.close()
def pull_trigger(self, thunk=None):
if thunk: