-
Notifications
You must be signed in to change notification settings - Fork 50
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
Set up ReceiveStream with proper algorithms #297
Conversation
Define pullAlgorithm and cancelAlgorithm, and set up ReceiveStream with them. This relies on whatwg/streams#1130. Fixes #185.
@ricea, can you take a look? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should wait for whatwg/streams#1130.
1. If |hasReceivedFIN| is true: | ||
1. [=set/Remove=] |stream| from |transport|'s [=[[ReceiveStreams]]=]. | ||
1. [=ReadableStream/Close=] |stream|. | ||
1. [=Resolve=] |promise| with undefined. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like if a RESET_STREAM
signal comes from the server, this promise will never be resolved. It doesn't seem to be observable, but it feels untidy to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a step and a note. We need to reject the promise with a proper error object, so I'd like to leave it as is.
The Streams spec change has been merged and within 24 hours should show up in cross-linking databases. One thing that changed is we used "enqueue" instead of "enqueue bytes". |
Thank you! I updated the PR. PTAL again. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great. Thank you for the helpful back and forth, and your patience along the way!
@ricea, can you take a look again? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm with nits.
lgtm |
Thank you! |
SHA: d1be624 Reason: push, by @yutakahirano Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Define pullAlgorithm and cancelAlgorithm, and set up ReceiveStream
with them.
This relies on whatwg/streams#1130.
Fixes #185.
💥 Error: 500 Internal Server Error 💥
PR Preview failed to build. (Last tried on Jul 29, 2021, 2:42 PM UTC).
More
PR Preview relies on a number of web services to run. There seems to be an issue with the following one:
🚨 CSS Spec Preprocessor - CSS Spec Preprocessor is the web service used to build Bikeshed specs.
🔗 Related URL
If you don't have enough information above to solve the error by yourself (or to understand to which web service the error is related to, if any), please file an issue.