Commit 8308db5c authored by Yury Selivanov's avatar Yury Selivanov

Merge 3.5 (asyncio)

parents 91f9def4 32dae3d5
...@@ -242,11 +242,14 @@ class StreamReaderProtocol(FlowControlMixin, protocols.Protocol): ...@@ -242,11 +242,14 @@ class StreamReaderProtocol(FlowControlMixin, protocols.Protocol):
self._loop.create_task(res) self._loop.create_task(res)
def connection_lost(self, exc): def connection_lost(self, exc):
if exc is None: if self._stream_reader is not None:
self._stream_reader.feed_eof() if exc is None:
else: self._stream_reader.feed_eof()
self._stream_reader.set_exception(exc) else:
self._stream_reader.set_exception(exc)
super().connection_lost(exc) super().connection_lost(exc)
self._stream_reader = None
self._stream_writer = None
def data_received(self, data): def data_received(self, data):
self._stream_reader.feed_data(data) self._stream_reader.feed_data(data)
......
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