Skip to content
This repository has been archived by the owner on Jul 6, 2018. It is now read-only.

Commit

Permalink
http2: turn on auto window_size updates
Browse files Browse the repository at this point in the history
  • Loading branch information
kjin authored and jasnell committed May 2, 2017
1 parent 117ef83 commit 76e21a4
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions src/node-http2-core-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ void Nghttp2Session::DrainDataChunks(nghttp2_pending_data_chunks_cb* cb) {
assert(cb != nullptr);
std::shared_ptr<nghttp2_data_chunks_t> chunks;
unsigned int n = 0;
size_t amount = 0;

while (cb->head != nullptr) {
if (chunks == nullptr) {
Expand All @@ -124,17 +123,12 @@ void Nghttp2Session::DrainDataChunks(nghttp2_pending_data_chunks_cb* cb) {
}
nghttp2_data_chunk_t* item = cb->head;
chunks->buf[n++] = uv_buf_init(item->buf.base, item->buf.len);
amount += item->buf.len;
cb->head = item->next;
data_chunk_free_list.push(item);
if (n == arraysize(chunks->buf) || cb->head == nullptr) {
chunks->nbufs = n;
OnDataChunks(cb->handle, chunks);
// Notify the nghttp2_session that a given chunk of data has been
// consumed and we are ready to receive more data for this stream
nghttp2_session_consume(session_, cb->handle->id(), amount);
n = 0;
amount = 0;
}
}
pending_data_chunks_free_list.push(cb);
Expand Down Expand Up @@ -267,7 +261,6 @@ int Nghttp2Session::Init(uv_loop_t* loop,
} else {
nghttp2_option_new(&opts);
}
nghttp2_option_set_no_auto_window_update(opts, 1);

switch (type) {
case NGHTTP2_SESSION_SERVER:
Expand Down

0 comments on commit 76e21a4

Please sign in to comment.