Skip to content

Commit

Permalink
fixup: clear storage early
Browse files Browse the repository at this point in the history
  • Loading branch information
apapirovski committed Apr 28, 2018
1 parent 51adabe commit 21f0e82
Showing 1 changed file with 2 additions and 1 deletion.
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;
Expand Down

0 comments on commit 21f0e82

Please sign in to comment.