Skip to content

Commit

Permalink
nghttpx: Fix handling of pending data
Browse files Browse the repository at this point in the history
  • Loading branch information
tatsuhiro-t committed Jan 2, 2015
1 parent 82320d6 commit d157744
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/shrpx_http2_session.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1417,7 +1417,7 @@ int Http2Session::downstream_write() {
auto n = std::min(wb_.wleft(), data_pendinglen_);
wb_.write(data_pending_, n);
if (n < data_pendinglen_) {
data_pendinglen_ += n;
data_pending_ += n;
data_pendinglen_ -= n;
return 0;
}
Expand Down
2 changes: 1 addition & 1 deletion src/shrpx_http2_upstream.cc
Original file line number Diff line number Diff line change
Expand Up @@ -726,7 +726,7 @@ int Http2Upstream::on_write() {
auto n = std::min(wb->wleft(), data_pendinglen_);
wb->write(data_pending_, n);
if (n < data_pendinglen_) {
data_pendinglen_ += n;
data_pending_ += n;
data_pendinglen_ -= n;
return 0;
}
Expand Down

0 comments on commit d157744

Please sign in to comment.