Skip to content

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

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsDocumentation in the Doc dirpendingThe issue will be closed if no feedback is providedtopic-socketRelated to the socket, socketserver and selectors modules

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions