Commit de42b271 authored by Guido van Rossum's avatar Guido van Rossum

Perhaps belt and suspenders: in handle_read() (both versions!), catch

socket errors from the recv() call and return early in that case.
parent ee1051cf
......@@ -94,7 +94,10 @@ if os.name == 'posix':
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 @@ else:
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:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment