summaryrefslogtreecommitdiff
path: root/src/node_http2.cc
diff options
context:
space:
mode:
authorAnatoli Papirovski <apapirovski@mac.com>2018-05-29 19:07:02 +0200
committerAnatoli Papirovski <apapirovski@mac.com>2018-06-01 10:58:26 +0200
commit35858bb98e08c3c275a416712e158b5d32992c9a (patch)
tree76b6238224473b39cb41f76c3bf7fa23be3de9e9 /src/node_http2.cc
parent87cd389bbfe69004c4792d4982908a350238a6da (diff)
downloadandroid-node-v8-35858bb98e08c3c275a416712e158b5d32992c9a.tar.gz
android-node-v8-35858bb98e08c3c275a416712e158b5d32992c9a.tar.bz2
android-node-v8-35858bb98e08c3c275a416712e158b5d32992c9a.zip
http2: force through RST_STREAM in destroy
If still needed, force through RST_STREAM in Http2Stream#destroy calls, so that nghttp2 can wrap up properly and doesn't continue trying to read & write data to the stream. PR-URL: https://github.com/nodejs/node/pull/21016 Fixes: https://github.com/nodejs/node/issues/21008 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
Diffstat (limited to 'src/node_http2.cc')
-rw-r--r--src/node_http2.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/node_http2.cc b/src/node_http2.cc
index 0bfdec9a57..be43cc1e69 100644
--- a/src/node_http2.cc
+++ b/src/node_http2.cc
@@ -1762,6 +1762,8 @@ void Http2Stream::Destroy() {
// Do nothing if this stream instance is already destroyed
if (IsDestroyed())
return;
+ if (session_->HasPendingRstStream(id_))
+ FlushRstStream();
flags_ |= NGHTTP2_STREAM_FLAG_DESTROYED;
Debug(this, "destroying stream");