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:
parent
57d02f5c57
commit
756e2b3e9b
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue