summaryrefslogtreecommitdiff
path: root/src/node_http2.cc
diff options
context:
space:
mode:
authorAnatoli Papirovski <apapirovski@mac.com>2017-10-28 20:25:35 -0400
committerAnatoli Papirovski <apapirovski@mac.com>2017-10-29 22:39:52 -0400
commite63782d7896dc840acdef1bc9b475da8ee4bb998 (patch)
tree8a2170d543fd6d0bcf8889a22d5a6c0a8d1c336d /src/node_http2.cc
parentb8888f5aa2deb41b7ab03d3085124eef398e461e (diff)
downloadandroid-node-v8-e63782d7896dc840acdef1bc9b475da8ee4bb998.tar.gz
android-node-v8-e63782d7896dc840acdef1bc9b475da8ee4bb998.tar.bz2
android-node-v8-e63782d7896dc840acdef1bc9b475da8ee4bb998.zip
http2: fix stream reading resumption
_read should always resume the underlying code that is attempting to push data to a readable stream. Adjust http2 core code to resume its reading appropriately. Some other general cleanup around reading, resuming & draining. PR-URL: https://github.com/nodejs/node/pull/16580 Fixes: https://github.com/nodejs/node/issues/16578 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Diffstat (limited to 'src/node_http2.cc')
-rw-r--r--src/node_http2.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/node_http2.cc b/src/node_http2.cc
index ec65e0052f..d12b9ca000 100644
--- a/src/node_http2.cc
+++ b/src/node_http2.cc
@@ -756,7 +756,7 @@ void Http2Session::FlushData(const FunctionCallbackInfo<Value>& args) {
if (!(stream = session->FindStream(id))) {
return args.GetReturnValue().Set(NGHTTP2_ERR_INVALID_STREAM_ID);
}
- stream->FlushDataChunks();
+ stream->ReadResume();
}
void Http2Session::UpdateChunksSent(const FunctionCallbackInfo<Value>& args) {