diff options
author | Anna Henningsen <anna@addaleax.net> | 2018-02-22 13:48:06 +0100 |
---|---|---|
committer | Anna Henningsen <anna@addaleax.net> | 2018-03-11 20:16:21 +0100 |
commit | 90e70b8caf26b73241c6f002c53d8cc96b6496b5 (patch) | |
tree | 0a0bee7b695131355e3850dc8bb3e536ce9f4093 /src/node_http2.cc | |
parent | 98a14e026bab0bda4013f75d1d0968a12fe5117f (diff) | |
download | android-node-v8-90e70b8caf26b73241c6f002c53d8cc96b6496b5.tar.gz android-node-v8-90e70b8caf26b73241c6f002c53d8cc96b6496b5.tar.bz2 android-node-v8-90e70b8caf26b73241c6f002c53d8cc96b6496b5.zip |
http2: simplify timeout tracking
There’s no need to reset the chunk counter for every write.
PR-URL: https://github.com/nodejs/node/pull/19206
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Diffstat (limited to 'src/node_http2.cc')
-rw-r--r-- | src/node_http2.cc | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/src/node_http2.cc b/src/node_http2.cc index 4ec6e6e54f..d683b075bc 100644 --- a/src/node_http2.cc +++ b/src/node_http2.cc @@ -1630,10 +1630,6 @@ inline Http2Stream* Http2Session::SubmitRequest( return stream; } -inline void Http2Session::SetChunksSinceLastWrite(size_t n) { - chunks_sent_since_last_write_ = n; -} - // Callback used to receive inbound data from the i/o stream void Http2Session::OnStreamRead(ssize_t nread, const uv_buf_t& buf) { Http2Scope h2scope(this); @@ -2016,7 +2012,6 @@ inline int Http2Stream::DoWrite(WriteWrap* req_wrap, CHECK(!this->IsDestroyed()); CHECK_EQ(send_handle, nullptr); Http2Scope h2scope(this); - session_->SetChunksSinceLastWrite(); if (!IsWritable()) { req_wrap->Done(UV_EOF); return 0; @@ -2519,8 +2514,6 @@ void Http2Stream::RespondFD(const FunctionCallbackInfo<Value>& args) { int64_t length = args[3]->IntegerValue(context).ToChecked(); int options = args[4]->IntegerValue(context).ToChecked(); - stream->session()->SetChunksSinceLastWrite(); - Headers list(isolate, context, headers); args.GetReturnValue().Set(stream->SubmitFile(fd, *list, list.length(), offset, length, options)); |