Skip to content

Commit

Permalink
Bug 1822038: Handle WebTransport Bidirectional streams arriving befor…
Browse files Browse the repository at this point in the history
…e the first pull r=kershaw

Differential Revision: https://phabricator.services.mozilla.com/D172414
  • Loading branch information
jesup committed Mar 21, 2023
1 parent 4843385 commit 428ae1c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion dom/webtransport/api/WebTransportStreams.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,10 @@ WebTransportIncomingStreamsAlgorithms::PullCallbackImpl(
RefPtr<WebTransportIncomingStreamsAlgorithms> self(this);
// The real work of PullCallback()
// Step 5: Wait until there is an available incoming unidirectional stream.
if (mTransport->mUnidirectionalStreams.Length() == 0) {
auto length = (mUnidirectional == StreamType::Unidirectional)
? mTransport->mUnidirectionalStreams.Length()
: mTransport->mBidirectionalStreams.Length();
if (length == 0) {
// We need to wait.
// Per
// https://streams.spec.whatwg.org/#readablestreamdefaultcontroller-pulling
Expand Down

0 comments on commit 428ae1c

Please sign in to comment.