Tolerate send_open() at Closed state?
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 1.6k
- Forks
- 382
- Avg merge
- 20h 23m
- Merged PRs (30d)
- 9
Description
I am having some issue with tunneling TCP using h2, it aborts the connection after the server (usually speedtest servers) resets the connection and h2 trying to send_open().
Not sure if this should be tolerated by h2 or to be handled by my code. I tried to do an early return with a Closed state and it seems to fix my problem.
pub fn send_open(&mut self, eos: bool) -> Result<(), UserError> {
let local = Streaming;
if matches!(self.inner, Inner::Closed(_)) {
return Ok(());
}
Any suggestions on a proper workaround?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in src/proto/streams/state.rs around send_open(), especially the Closed-state handling, and trace how a reset leads to this call. Determine whether send_open() should tolerate Closed or whether callers must handle it; done means an agreed behavior with the corresponding regression coverage or workaround documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100