Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RTCQuicStream.waitForReadable() Incorrect threshold #6

Closed
shampson opened this issue Apr 18, 2018 · 1 comment
Closed

RTCQuicStream.waitForReadable() Incorrect threshold #6

shampson opened this issue Apr 18, 2018 · 1 comment
Assignees
Labels
PR exists A pull request has been submitted

Comments

@shampson
Copy link
Collaborator

In step 5. of waitForReadable, the threshold is computed as the stream's [[TargetReadBufferedAmount]] slot minus amount specified as the parameter to the method. Once [[ReadBufferedAmount]] increases above the threshold, the promise is resolved.

I think there was an error in computing the threshold (because it was computed in a similar way as waitForWritable). The true threshold should just be the amount specified. It doesn't make sense to compute the amount read based upon the target buffered amount. Then, for example, you could specify an amount equal to [[TargetReadBufferedAmount]] ("When I have the full target read buffered amount available in the read buffer, let me know so that I can read it out"), the threshold would be computed as 0 - meaning that the promise would resolve immediately with nothing in the read buffer.

aboba added a commit that referenced this issue May 1, 2018
@aboba aboba added the PR exists A pull request has been submitted label May 1, 2018
@aboba aboba self-assigned this May 1, 2018
@aboba
Copy link
Collaborator

aboba commented May 1, 2018

@shampson Yes, this looks like a typo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR exists A pull request has been submitted
Projects
None yet
Development

No branches or pull requests

2 participants