Skip to content

API sharp edge: reading the entire stream #3222

@flub

Description

@flub

QUIC has a limit on the maximum number of open streams at any one time. However it seems it might sometimes be a bit easy to accidentally leave a stream open.

The problem is that if you know the exact size of the message on the stream, e.g. due to a length-prefixed message, you might read exactly this many bytes. But you need to read "past" the end of the stream to have consumed the whole stream. So reading the exact number of bytes might still leave you with an open stream.

I think this has affected multiple people independently, so it would be good to:

  1. Reproduce this so we are absolutely clear about the semantics.
  2. Figure out if we can improve the API to make this less brittle.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    No status

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions