nghttp, h2load: Fix regression introduced in 795a22a

We missed wb.reset(), which makes write buffer's capacity becomes 0
and communication stalls eventually.
This commit is contained in:
Tatsuhiro Tsujikawa 2015-02-11 21:42:11 +09:00
parent 57d02f5c57
commit 756e2b3e9b
2 changed files with 4 additions and 4 deletions

View File

@ -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;
}

View File

@ -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;
}