GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — quic: fix fix h3 session close on early str. destr · martenrichter/node@82db30b

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • src/quic
    • http3.cc
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎src/quic/http3.cc‎

Copy file name to clipboardExpand all lines: src/quic/http3.cc
+7-6Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -563,12 +563,9 @@ class Http3ApplicationImpl final : public Session::Application {
563563

564564
void StreamRemoved(stream_id id) override {
565565
if (!conn_) return;
566-
// Once the Stream is gone, nothing can supply its body data. Stop
567-
// nghttp3 from writing to it. Otherwise a response whose headers were
568-
// submitted but not yet sent makes nghttp3 call on_read_data_callback
569-
// for a stream that no longer exists, which fails and closes the
570-
// whole session.
571-
nghttp3_conn_shutdown_stream_write(*this, id);
566+
// Once the Stream is gone, nothing can supply its body data.
567+
// So the on_read_data_callback should detect the nullptr user_data
568+
// and signal EOF.
572569
nghttp3_conn_set_stream_user_data(*this, id, nullptr);
573570
}
574571

@@ -1202,6 +1199,10 @@ class Http3ApplicationImpl final : public Session::Application {
12021199
CHECK_NOT_NULL(ptr);
12031200
auto& app = *ptr;
12041201
NgHttp3CallbackScope scope(&app.session());
1202+
if (stream_user_data == nullptr) {
1203+
// stream is gone on js side, we exit silently
1204+
return NGHTTP3_DATA_FLAG_EOF;
1205+
}
12051206

12061207
BaseObjectPtr<Stream> stream(static_cast<Stream*>(stream_user_data));
12071208
if (!stream) [[unlikely]] {

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.