projects
/
python
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fcfb946
)
asyncio: Fix _UnixWritePipeTransport, raise BrokenPipeError when the pipe is
author
Victor Stinner
<victor.stinner@gmail.com>
Fri, 31 Jan 2014 12:04:28 +0000
(13:04 +0100)
committer
Victor Stinner
<victor.stinner@gmail.com>
Fri, 31 Jan 2014 12:04:28 +0000
(13:04 +0100)
closed, but only if there was pending write
Lib/asyncio/unix_events.py
patch
|
blob
|
history
diff --git
a/Lib/asyncio/unix_events.py
b/Lib/asyncio/unix_events.py
index ac764f8ad56c15580d345274c52546b90a9f5003..98fdddeec98c67745766c1dc050298df37625c50 100644
(file)
--- a/
Lib/asyncio/unix_events.py
+++ b/
Lib/asyncio/unix_events.py
@@
-283,7
+283,10
@@
class _UnixWritePipeTransport(selector_events._FlowControlMixin,
def _read_ready(self):
# Pipe was closed by peer.
- self._close()
+ if self._buffer:
+ self._close(BrokenPipeError())
+ else:
+ self._close()
def write(self, data):
assert isinstance(data, (bytes, bytearray, memoryview)), repr(data)