What effect would calling shutdown(SHUT_RD) at this point have? The kernel
already knows that no more data will be read. IIUC SHUT_RD would be useful
only if you want to indicate you are not interested in reading more without
having received an EOF.


On Fri, Jun 27, 2014 at 2:26 PM, Victor Stinner <[email protected]>
wrote:

> Hi,
>
> While reviewing an old asyncore issue,
> http://bugs.python.org/issue12498
>
> I read  the source code of _SelectorSocketTransport. I see that
> write_eof() calls sock.shutdown(socket.SHUT_WR). _read_ready() closes
> the socket if it didn't receive any data. It can keep the socket open
> to write more data if protocol.eof_received() is False, but it doesn't
> call sock.shutdown(socket.SHUT_RD).
>
> Is there a reason for not calling sock.shutdown(socket.SHUT_RD)? If
> yes, it would be nice to document it in a comment.
>
> Victor
>



-- 
--Guido van Rossum (python.org/~guido)

Reply via email to