Skip to content

The "socket programming HowTO" suggests wrong socket.send behavior #109532

@d-maurer

Description

@d-maurer

https://docs.python.org/3/howto/sockets.html#socket-howto
suggests (via the MySocket.mysend example in the section "Using a Socket") that send on a socket closed by the remote end returns 0 to indicate the disconnection.
On my system (Linux 5.4, Python 3.10), socket.send does not return 0 in this
case but raises OSError(EPIPE) instead.

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsDocumentation in the Doc dirpendingThe issue will be closed if no feedback is provided
    No fields configured for issues without a type.

    Projects

    Status
    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions