nghttpx: Fix handling of pending data
This commit is contained in:
parent
82320d6e55
commit
d157744fb2
|
@ -1417,7 +1417,7 @@ int Http2Session::downstream_write() {
|
||||||
auto n = std::min(wb_.wleft(), data_pendinglen_);
|
auto n = std::min(wb_.wleft(), data_pendinglen_);
|
||||||
wb_.write(data_pending_, n);
|
wb_.write(data_pending_, n);
|
||||||
if (n < data_pendinglen_) {
|
if (n < data_pendinglen_) {
|
||||||
data_pendinglen_ += n;
|
data_pending_ += n;
|
||||||
data_pendinglen_ -= n;
|
data_pendinglen_ -= n;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -726,7 +726,7 @@ int Http2Upstream::on_write() {
|
||||||
auto n = std::min(wb->wleft(), data_pendinglen_);
|
auto n = std::min(wb->wleft(), data_pendinglen_);
|
||||||
wb->write(data_pending_, n);
|
wb->write(data_pending_, n);
|
||||||
if (n < data_pendinglen_) {
|
if (n < data_pendinglen_) {
|
||||||
data_pendinglen_ += n;
|
data_pending_ += n;
|
||||||
data_pendinglen_ -= n;
|
data_pendinglen_ -= n;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue