Skip to content

QuicStream.WritesClosed continuation ran before the Quic reset frame is sent? #79911

@bentoi

Description

@bentoi

Kind of related to #79818 but for QuicStream.WritesClosed this time.

When aborting a stream writing side, it looks like the WritesClosed continuation is ran before the reset frame is actually sent to the peer. If the continuation disposes of the stream, the peer ReadAsync sometime completes successfully.

It's also actually not clear to me why DisposeAsync doesn't abort the stream with the default error code.

I've attached a test case. Here's the test case failure:

Running test...
Running test...
Running test...
Running test...
Running test...
Unhandled exception. System.InvalidOperationException: didn't expect ReadAsync to succeed with 0 bytes!
   at Program.Main(String[] args) in /home/vagrant/workspace/quicabortwrite/Program.cs:line 60
   at Program.Main(String[] args) in /home/vagrant/workspace/quicabortwrite/Program.cs:line 64
   at Program.Main(String[] args) in /home/vagrant/workspace/quicabortwrite/Program.cs:line 64
   at Program.Main(String[] args) in /home/vagrant/workspace/quicabortwrite/Program.cs:line 43
   at Program.<Main>(String[] args)

quicabortwrite.zip

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions