Kaydet (Commit) 1f683bbe authored tarafından Guido van Rossum's avatar Guido van Rossum

asyncio: When not closing the connection after receiving EOF, still remove the read handler.

üst 4574b497
...@@ -468,7 +468,12 @@ class _SelectorSocketTransport(_SelectorTransport): ...@@ -468,7 +468,12 @@ class _SelectorSocketTransport(_SelectorTransport):
self._protocol.data_received(data) self._protocol.data_received(data)
else: else:
keep_open = self._protocol.eof_received() keep_open = self._protocol.eof_received()
if not keep_open: if keep_open:
# We're keeping the connection open so the
# protocol can write more, but we still can't
# receive more, so remove the reader callback.
self._loop.remove_reader(self._sock_fd)
else:
self.close() self.close()
def write(self, data): def write(self, 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