commit | 0c1aede73a1abc0a223812105881847fbbee2224 | [log] [tgz] |
---|---|---|
author | Zeke Lu <lvzecai@gmail.com> | Thu Oct 27 02:15:54 2022 +0000 |
committer | Gopher Robot <gobot@golang.org> | Thu Oct 27 04:30:12 2022 +0000 |
tree | cee1c2a57463397c61edcf3ed2672d67de756e8b | |
parent | 84c13af5f4449b859ebfa62d481cce07fedf6da4 [diff] |
http2: calculate a correct window increment size for a stream CL 432038 reduces sending WindowUpdates by introducing a threshold. Once the remaining bytes are below the threshold, a single WindowUpdate is sent to reset the amount back to the maximum amount configured. The window increment size for a stream is calculated from: sc.srv.initialStreamRecvWindowSize() - st.inflow.available() Where (*flow).available is defined as: func (f *flow) available() int32 { n := f.n if f.conn != nil && f.conn.n < n { n = f.conn.n } return n } When f.conn.c < f.n, it gets a bigger increment size. It should be calculated from: sc.srv.initialStreamRecvWindowSize() - st.inflow.n While we're here, remove an unnecessary type conversion too. Updates golang/go#56315. Change-Id: I4b26b27e4c5c5cd66e6a32b152d68f304adc65d8 GitHub-Last-Rev: 02fc09c1e7564243630d3555e7880ba352eea0fe GitHub-Pull-Request: golang/net#155 Reviewed-on: https://go-review.googlesource.com/c/net/+/444816 TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Damien Neil <dneil@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com> Auto-Submit: Ian Lance Taylor <iant@google.com> Run-TryBot: Ian Lance Taylor <iant@google.com> Run-TryBot: Damien Neil <dneil@google.com>
This repository holds supplementary Go networking libraries.
The easiest way to install is to run go get -u golang.org/x/net
. You can also manually git clone the repository to $GOPATH/src/golang.org/x/net
.
This repository uses Gerrit for code changes. To learn how to submit changes to this repository, see https://golang.org/doc/contribute.html. The main issue tracker for the net repository is located at https://github.com/golang/go/issues. Prefix your issue with “x/net:” in the subject line, so it is easy to find.