Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 7f34c27

Browse filesBrowse files
addaleaxMylesBorins
authored andcommitted
http2: simplify timeout tracking
There’s no need to reset the chunk counter for every write. Backport-PR-URL: #23774 PR-URL: #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>
1 parent 18071db commit 7f34c27
Copy full SHA for 7f34c27

File tree

Expand file treeCollapse file tree

2 files changed

+0
-9
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

2 files changed

+0
-9
lines changed
Open diff view settings
Collapse file

‎src/node_http2.cc‎

Copy file name to clipboardExpand all lines: src/node_http2.cc
-7Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1798,10 +1798,6 @@ inline Http2Stream* Http2Session::SubmitRequest(
17981798
return stream;
17991799
}
18001800

1801-
inline void Http2Session::SetChunksSinceLastWrite(size_t n) {
1802-
chunks_sent_since_last_write_ = n;
1803-
}
1804-
18051801
// Allocates the data buffer used to pass outbound data to the i/o stream.
18061802
WriteWrap* Http2Session::AllocateSend() {
18071803
HandleScope scope(env()->isolate());
@@ -2257,7 +2253,6 @@ inline int Http2Stream::DoWrite(WriteWrap* req_wrap,
22572253
CHECK(!this->IsDestroyed());
22582254
CHECK_EQ(send_handle, nullptr);
22592255
Http2Scope h2scope(this);
2260-
session_->SetChunksSinceLastWrite();
22612256
req_wrap->Dispatched();
22622257
if (!IsWritable()) {
22632258
req_wrap->Done(UV_EOF);
@@ -2751,8 +2746,6 @@ void Http2Stream::RespondFD(const FunctionCallbackInfo<Value>& args) {
27512746
int64_t length = args[3]->IntegerValue(context).ToChecked();
27522747
int options = args[4]->IntegerValue(context).ToChecked();
27532748

2754-
stream->session()->SetChunksSinceLastWrite();
2755-
27562749
Headers list(isolate, context, headers);
27572750
args.GetReturnValue().Set(stream->SubmitFile(fd, *list, list.length(),
27582751
offset, length, options));
Collapse file

‎src/node_http2.h‎

Copy file name to clipboardExpand all lines: src/node_http2.h
-2Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -815,8 +815,6 @@ class Http2Session : public AsyncWrap {
815815
// Write data to the session
816816
inline ssize_t Write(const uv_buf_t* bufs, size_t nbufs);
817817

818-
inline void SetChunksSinceLastWrite(size_t n = 0);
819-
820818
size_t self_size() const override { return sizeof(*this); }
821819

822820
char* stream_alloc() {

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.