Skip to content

Commit 89fbbc4

Browse files
addaleaxMylesBorins
authored andcommitted
http2: simplify timeout tracking
There’s no need to reset the chunk counter for every write. PR-URL: #19206 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Daniel Bevenius <[email protected]> Reviewed-By: Anatoli Papirovski <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
1 parent 0602166 commit 89fbbc4

File tree

2 files changed

+0
-9
lines changed

2 files changed

+0
-9
lines changed

‎src/node_http2.cc‎

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1630,10 +1630,6 @@ inline Http2Stream* Http2Session::SubmitRequest(
16301630
return stream;
16311631
}
16321632

1633-
inlinevoidHttp2Session::SetChunksSinceLastWrite(size_t n){
1634-
chunks_sent_since_last_write_ = n;
1635-
}
1636-
16371633
// Callback used to receive inbound data from the i/o stream
16381634
voidHttp2Session::OnStreamRead(ssize_t nread, constuv_buf_t& buf){
16391635
Http2Scope h2scope(this);
@@ -2016,7 +2012,6 @@ inline int Http2Stream::DoWrite(WriteWrap* req_wrap,
20162012
CHECK(!this->IsDestroyed());
20172013
CHECK_EQ(send_handle, nullptr);
20182014
Http2Scope h2scope(this);
2019-
session_->SetChunksSinceLastWrite();
20202015
if (!IsWritable()){
20212016
req_wrap->Done(UV_EOF);
20222017
return0;
@@ -2519,8 +2514,6 @@ void Http2Stream::RespondFD(const FunctionCallbackInfo<Value>& args){
25192514
int64_t length = args[3]->IntegerValue(context).ToChecked();
25202515
int options = args[4]->IntegerValue(context).ToChecked();
25212516

2522-
stream->session()->SetChunksSinceLastWrite();
2523-
25242517
Headers list(isolate, context, headers);
25252518
args.GetReturnValue().Set(stream->SubmitFile(fd, *list, list.length(),
25262519
offset, length, options));

‎src/node_http2.h‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -884,8 +884,6 @@ class Http2Session : public AsyncWrap, public StreamListener{
884884
// Write data to the session
885885
inlinessize_tWrite(constuv_buf_t* bufs, size_t nbufs);
886886

887-
inlinevoidSetChunksSinceLastWrite(size_t n = 0);
888-
889887
size_tself_size() constoverride{returnsizeof(*this)}
890888

891889
inlinevoidGetTrailers(Http2Stream* stream, uint32_t* flags);

0 commit comments

Comments
(0)