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 dir

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions