[Zodb-checkins] CVS: ZODB3/ZEO/zrpc - trigger.py:1.11
Guido van Rossum
guido@python.org
Tue, 12 Nov 2002 08:36:11 -0500
Update of /cvs-repository/ZODB3/ZEO/zrpc
In directory cvs.zope.org:/tmp/cvs-serv25736
Modified Files:
trigger.py
Log Message:
Perhaps belt and suspenders: in handle_read() (both versions!), catch
socket errors from the recv() call and return early in that case.
=== ZODB3/ZEO/zrpc/trigger.py 1.10 => 1.11 ===
--- ZODB3/ZEO/zrpc/trigger.py:1.10 Tue Nov 5 13:13:11 2002
+++ ZODB3/ZEO/zrpc/trigger.py Tue Nov 12 08:36:11 2002
@@ -94,7 +94,10 @@
os.write(self.trigger, 'x')
def handle_read(self):
- self.recv(8192)
+ try:
+ self.recv(8192)
+ except socket.error:
+ return
self.lock.acquire()
try:
for thunk in self.thunks:
@@ -182,7 +185,10 @@
self.trigger.send('x')
def handle_read(self):
- self.recv(8192)
+ try:
+ self.recv(8192)
+ except socket.error:
+ return
self.lock.acquire()
try:
for thunk in self.thunks: