paramiko / paramiko/paramiko

Channel.shutdown_read() does not fail/unblock reads

Open
#939 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Bug Needs changelog/docs Ready for review
Dominant language
Python
Stars
9.9k
Forks
2.1k
PR merge metrics
No merged PRs in 30d

Description

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]

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating Channel.shutdown_read() and comparing its eof_received behavior with _handle_eof. Verify that future reads fail and that outstanding reads in background threads are unblocked or fail, matching the native Python socket behavior described in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
networking
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.