Commit d157744f authored by Tatsuhiro Tsujikawa's avatar Tatsuhiro Tsujikawa

nghttpx: Fix handling of pending data

parent 82320d6e
......@@ -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;
}
......
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment