Commit 58b40c4f authored by Dag Haavi Finstad's avatar Dag Haavi Finstad

Kill h2->[tr]_window

Maintain stream 0 window limits via h2->req0.
parent 89acac8f
......@@ -144,9 +144,6 @@ struct h2_sess {
struct h2_req *mailcall;
pthread_cond_t *cond;
int64_t r_window;
int64_t t_window;
struct sess *sess;
int refcnt;
uint32_t highest_stream;
......
......@@ -660,7 +660,7 @@ h2_rx_data(struct worker *wrk, struct h2_sess *h2, struct h2_req *r2)
Lck_Lock(&h2->sess->mtx);
AZ(h2->mailcall);
h2->mailcall = r2;
h2->r_window -= h2->rxf_len;
h2->req0->r_window -= h2->rxf_len;
r2->r_window -= h2->rxf_len;
// req_bodybytes accounted in CNT code.
if (r2->cond)
......@@ -668,8 +668,8 @@ h2_rx_data(struct worker *wrk, struct h2_sess *h2, struct h2_req *r2)
while (h2->mailcall != NULL && h2->error == 0 && r2->error == 0)
AZ(Lck_CondWait(h2->cond, &h2->sess->mtx, 0));
wi = cache_param->h2_rx_window_increment;
if (h2->r_window < cache_param->h2_rx_window_low_water) {
h2->r_window += wi;
if (h2->req0->r_window < cache_param->h2_rx_window_low_water) {
h2->req0->r_window += wi;
w1 = 1;
}
if (r2->r_window < cache_param->h2_rx_window_low_water) {
......
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