Skip to content

stream send behavior after stream send is shutdown #682

Done

Description

@keepsimple1

The current code pretends Ok when pushing more data to a stream send after it is shutdown:

return Ok(data.len());

I bumped into a case, where it seems causing a problem that consumes the send capacity and impacts other streams. I was wondering what was the rationale of not returning error? And is this a known issue, or maybe I missed something?

Activity

  1. LPardue commented on Nov 2, 2020

    @LPardue
    Contributor

    Thanks, this seems a legitimate concern to me. Wonder what others think.

  2. keepsimple1 commented on Nov 4, 2020

    @keepsimple1
    ContributorAuthor

    I wrote a small test case to illustrate this issue. Here is the gist. (It's based on 0.6.0 or master head @b335378.).

    The test shows two things:

    1. After the server has shutdown stream 4 write, the call stream_send() still returns Ok with non-zero size until Ok(0) after a few calls. Ideally stream_send() should return Err.

    2. stream_send() on another stream 8 failed afterwards, which means the above stream 4 writes were not no-ops. If comment out the stream 4 writes, then stream 8 write will succeed.

  3. added
    type: bugfix
    area: streams
    on Nov 24, 2026
  4. ghedo commented on Nov 25, 2026

    @ghedo
    Member

    Fixed by 76598e4, released in 0.8.0. After stream_shutdown(Write), quiche sends RESET_STREAM and stream_send() returns FinalSize instead of accepting more data.

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

    area: streamstype: bugfix

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions