mirror of
https://github.com/nghttp2/nghttp2.git
synced 2025-12-08 02:58:53 +08:00
nghttpx: Reset buffer on empty
This commit is contained in:
@@ -156,11 +156,11 @@ int ClientHandler::write_clear() {
|
|||||||
wlimit_.drain(nwrite);
|
wlimit_.drain(nwrite);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
wb_.reset();
|
||||||
if (on_write() != 0) {
|
if (on_write() != 0) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
if (wb_.rleft() == 0) {
|
if (wb_.rleft() == 0) {
|
||||||
wb_.reset();
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -310,6 +310,7 @@ int ClientHandler::write_tls() {
|
|||||||
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
wb_.reset();
|
||||||
if (on_write() != 0) {
|
if (on_write() != 0) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1653,11 +1653,11 @@ int Http2Session::write_clear() {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
wb_.reset();
|
||||||
if (on_write() != 0) {
|
if (on_write() != 0) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
if (wb_.rleft() == 0) {
|
if (wb_.rleft() == 0) {
|
||||||
wb_.reset();
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1729,6 +1729,7 @@ int Http2Session::read_tls() {
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
rb_.reset();
|
||||||
struct iovec iov[2];
|
struct iovec iov[2];
|
||||||
auto iovcnt = rb_.wiovec(iov);
|
auto iovcnt = rb_.wiovec(iov);
|
||||||
if (iovcnt > 0) {
|
if (iovcnt > 0) {
|
||||||
@@ -1792,6 +1793,7 @@ int Http2Session::write_tls() {
|
|||||||
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
wb_.reset();
|
||||||
if (on_write() != 0) {
|
if (on_write() != 0) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user