Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/node_http2.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1186,7 +1186,10 @@ int Http2Session::OnDataChunkReceived(nghttp2_session* handle,
stream->inbound_consumed_data_while_paused_ += avail;

// If we have a gathered a lot of data for output, try sending it now.
if (session->outgoing_length_ > 4096) session->SendPendingData();
if (session->outgoing_length_ > 4096 ||
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: not a c++ expert, but we can move 4096 to variable and re-use.

stream->available_outbound_length_ > 4096) {
session->SendPendingData();
}
} while (len != 0);

// If we are currently waiting for a write operation to finish, we should
Expand Down