diff --git a/transport/http2_client.go b/transport/http2_client.go index d27199b2211a..27a72a0e5566 100644 --- a/transport/http2_client.go +++ b/transport/http2_client.go @@ -1166,7 +1166,7 @@ func (t *http2Client) applySettings(ss []http2.Setting) { t.mu.Lock() for _, stream := range t.activeStreams { // Adjust the sending quota for each stream. - stream.sendQuotaPool.add(int(s.Val - t.streamSendQuota)) + stream.sendQuotaPool.add(int(s.Val) - int(t.streamSendQuota)) } t.streamSendQuota = s.Val t.mu.Unlock() diff --git a/transport/http2_server.go b/transport/http2_server.go index 130a39d52be2..85590d2086c8 100644 --- a/transport/http2_server.go +++ b/transport/http2_server.go @@ -875,7 +875,7 @@ func (t *http2Server) applySettings(ss []http2.Setting) { t.mu.Lock() defer t.mu.Unlock() for _, stream := range t.activeStreams { - stream.sendQuotaPool.add(int(s.Val - t.streamSendQuota)) + stream.sendQuotaPool.add(int(s.Val) - int(t.streamSendQuota)) } t.streamSendQuota = s.Val }