summaryrefslogtreecommitdiffstats
path: root/Lib/asyncio/proactor_events.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2015-01-21 22:40:19 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2015-01-21 22:40:19 (GMT)
commit91d11bbb2d5742b291e48e9889bd9c51b0b39fb6 (patch)
tree678a3dcfd28c30b19580e60fa4f1e2bad9f052bf /Lib/asyncio/proactor_events.py
parentafb507c0024686237fd384ea06f934c9ac80741b (diff)
parentd0a28dee78d099fcadc71147cba4affb6efa0c97 (diff)
downloadcpython-91d11bbb2d5742b291e48e9889bd9c51b0b39fb6.zip
cpython-91d11bbb2d5742b291e48e9889bd9c51b0b39fb6.tar.gz
cpython-91d11bbb2d5742b291e48e9889bd9c51b0b39fb6.tar.bz2
Merge 3.4 (asyncio)
Diffstat (limited to 'Lib/asyncio/proactor_events.py')
-rw-r--r--Lib/asyncio/proactor_events.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/Lib/asyncio/proactor_events.py b/Lib/asyncio/proactor_events.py
index 6d8641f..ed17062 100644
--- a/Lib/asyncio/proactor_events.py
+++ b/Lib/asyncio/proactor_events.py
@@ -463,9 +463,15 @@ class BaseProactorEventLoop(base_events.BaseEventLoop):
if f is not None:
f.result() # may raise
f = self._proactor.recv(self._ssock, 4096)
- except:
- self.close()
- raise
+ except futures.CancelledError:
+ # _close_self_pipe() has been called, stop waiting for data
+ return
+ except Exception as exc:
+ self.call_exception_handler({
+ 'message': 'Error on reading from the event loop self pipe',
+ 'exception': exc,
+ 'loop': self,
+ })
else:
self._self_reading_future = f
f.add_done_callback(self._loop_self_reading)