Skip to content
Closed
Changes from 1 commit
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
Prev Previous commit
fixup: clear storage early
  • Loading branch information
apapirovski committed Apr 28, 2018
commit 21f0e82e77052e5416d0c435385f0dbc18f3109c
3 changes: 2 additions & 1 deletion src/node_http2.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1366,14 +1366,15 @@ void Http2Session::ClearOutgoing(int status) {
CHECK_NE(flags_ & SESSION_STATE_SENDING, 0);

if (outgoing_buffers_.size() > 0) {
outgoing_storage_.clear();

for (const nghttp2_stream_write& wr : outgoing_buffers_) {
WriteWrap* wrap = wr.req_wrap;
if (wrap != nullptr)
wrap->Done(status);
}

outgoing_buffers_.clear();
outgoing_storage_.clear();
}

flags_ &= ~SESSION_STATE_SENDING;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

As far as I know, out streams implementation would typically send data that has buffered up on the writable side from within the wrap->Done() callback… it’s probably worth checking the benchmarks here

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

h2load is still not installed on the CI. :( I can try on my machine but I find all the network benchmarks pretty unreliable on Macs.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Ok, I managed to run these on a separate machine on DO. No regressions that I could see...

Expand Down