Commit 756e2b3e authored by Tatsuhiro Tsujikawa's avatar Tatsuhiro Tsujikawa

nghttp, h2load: Fix regression introduced in 795a22a3

We missed wb.reset(), which makes write buffer's capacity becomes 0
and communication stalls eventually.
parent 57d02f5c
......@@ -534,12 +534,11 @@ int Client::write_clear() {
wb.drain(nwrite);
continue;
}
wb.reset();
if (on_write() != 0) {
return -1;
}
if (wb.rleft() == 0) {
wb.reset();
break;
}
}
......@@ -668,6 +667,7 @@ int Client::write_tls() {
continue;
}
wb.reset();
if (on_write() != 0) {
return -1;
}
......
......@@ -666,12 +666,11 @@ int HttpClient::write_clear() {
wb.drain(nwrite);
continue;
}
wb.reset();
if (on_writefn(*this) != 0) {
return -1;
}
if (wb.rleft() == 0) {
wb.reset();
break;
}
}
......@@ -1169,6 +1168,7 @@ int HttpClient::write_tls() {
continue;
}
wb.reset();
if (on_writefn(*this) != 0) {
return -1;
}
......
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