Skip to content

Channel.shutdown_read() does not fail/unblock reads #939

Open

Description

@cpatulea

Channel.shutdown_read() claims that future reads will fail.

On a native Python socket object, shutdown(SHUT_RD) both fails future reads, and unblocks/fails any outstanding reads in background threads.

Channel.shutdown_read() does neither, because it only sets eof_received, which recv() doesn't check, and it has no mechanism for notifying background threads.

_handle_eof does fix these issues.

[maintainer edit: replaced inline snippet with link to PR: #940]

Activity

  1. ploxiln commented on Apr 12, 2017

    @ploxiln
    Contributor

    Your diff is unreadable. Edit your issue description, and put the diff in a "fenced code block" - https://help.github.com/articles/creating-and-highlighting-code-blocks/

    Even better would be to open a pull request with the proposed changes.

  2. cpatulea commented on Apr 13, 2017

    @cpatulea
    Author
  3. ploxiln commented on Apr 13, 2017

    @ploxiln
    Contributor

    That's readable, thanks!

  4. added this to the milestone on Apr 13, 2017
  5. cpatulea commented on Apr 25, 2017

    @cpatulea
    Author

    Hey, I was hoping to get this upstreamed. Does this look reasonable?

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions