Skip to content

Conversation

@JamesNK
Copy link
Member

@JamesNK JamesNK commented Jul 30, 2021

No description provided.

var buffer = new byte[clientBufferSize];
var readCount = 0;

while ((readCount = await responseStream.ReadAsync(buffer).DefaultTimeout()) != -1)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does responseStream.ReadAsync() returning -1 mean? Should this be checking for 0 and failing if we reach the end of the Stream early?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It means I made a mistake 😄

It is never a problem because the break on length always comes before the stream returns 0 (which is what was meant to be tested).

I've updated all the tests to use existing helper methods.

@JamesNK JamesNK enabled auto-merge (squash) July 30, 2021 22:29
@JamesNK JamesNK merged commit 179caa3 into main Jul 30, 2021
@JamesNK JamesNK deleted the jamesnk/http3-serverstreaming-partialresponse branch July 30, 2021 23:39
@ghost ghost added this to the 6.0-rc1 milestone Jul 30, 2021
@amcasey amcasey added area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions and removed area-runtime labels Jun 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants