quic: add promise to QuicStream for pending strms - #65862
Conversation
before this PR, it was necessary to poll, if a stream can not be created immediately due to flow control. This PR adds a promise to QuicStream, that fulfills, when a stream is available and ready. Signed-off-by: Marten Richter <marten.richter@freenet.de>
|
Review requested:
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #65862 +/- ##
==========================================
+ Coverage 90.14% 90.17% +0.02%
==========================================
Files 769 771 +2
Lines 262968 265132 +2164
Branches 50060 50352 +292
==========================================
+ Hits 237057 239076 +2019
- Misses 16932 17019 +87
- Partials 8979 9037 +58
🚀 New features to boost your workflow:
|
| added: v23.8.0 | ||
| --> | ||
|
|
||
| ### `stream.ready` |
There was a problem hiding this comment.
Imo stream.opened would be a slightly clearer API, to match session.opened and stream.stats.opened_at.
There was a problem hiding this comment.
Ok, I have changed it. (Will push soon). readycame from WebStream semantics.
| } else { | ||
| inner.pendingClose.resolve(); | ||
| } | ||
| if (inner.pending) { |
There was a problem hiding this comment.
This doesn't work, it should be inner.state.pending, so this branch is never being run. Would be good to have a test to cover the failure case here as well imo.
There was a problem hiding this comment.
Oh, a second place with this error. I thought I got all. Now, fixed and also added a test.
before this PR, it was necessary to poll, if a
stream can not be created immediately due to
flow control.
This PR adds a promise to QuicStream, that fulfills, when a stream is available and ready.