Skip to content

Commit 4d3ff4b

Browse files
committed
quic: Do not try to open WT sending on remote unidirectional stream
1 parent d60994d commit 4d3ff4b

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

src/quic/application.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,8 @@ class Session::Application : public MemoryRetainer {
209209
// connects the webtransport session stream to stream object,
210210
// it also sends some initial bytes to the wire to signal
211211
// the other side, that this is a webtransport stream
212+
// it is a noop, if we can not send on this stream incoming
213+
// unidirectional stream
212214
virtual bool MakeWebtransportStream(const Stream& stream,
213215
int64_t sessionid) {
214216
return false;

src/quic/http3.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -670,12 +670,14 @@ class Http3ApplicationImpl final : public Session::Application {
670670
Session::SendPendingDataScope send_scope(&session());
671671
static constexpr nghttp3_data_reader reader = {on_read_data_callback};
672672
const nghttp3_data_reader* reader_ptr = &reader; // can use the same reader
673-
printf("mws in mark 3\n");
674673

675674
Debug(&session(),
676675
"Make stream %" PRIu64 " webtransport stream of session %" PRIu64,
677676
stream.id(),
678677
sessionid);
678+
// we only need to do this, if we can send data
679+
if (stream.is_remote_unidirectional())
680+
return true; // so bail out for remote unidirectional streams
679681
return nghttp3_conn_open_wt_data_stream(*this,
680682
sessionid,
681683
stream.id(),

0 commit comments

Comments
 (0)