diff options
| author | Will Hawkins <[email protected]> | 2023-06-02 17:56:55 -0400 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-06-02 17:56:55 -0400 |
| commit | 97ae1cf4cb8ff0ab578ba5aa461a2552bf4ec044 (patch) | |
| tree | 2843e76330847193b40fe2573d59c01d0b820f62 | |
| parent | 6ed3213da8666b9e4e51ae232f2109663d28306e (diff) | |
| parent | 4c8ac8a5691b57f43cff4df221736df159646400 (diff) | |
Merge pull request #53 from network-quality/strict_max_concurrent
[Bugfix] Global adherence to max concurrent streams
| -rw-r--r-- | utilities/transport.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/utilities/transport.go b/utilities/transport.go index 2d70989..8e890d0 100644 --- a/utilities/transport.go +++ b/utilities/transport.go @@ -41,6 +41,9 @@ func OverrideHostTransport(transport *http.Transport, connectToAddr string) { return dialer.DialContext(ctx, network, addr) } - http2.ConfigureTransport(transport) - + if t2, err := http2.ConfigureTransports(transport); err != nil { + panic("Panic: Could not properly upgrade an http/1.1 transport for http/2.") + } else { + t2.StrictMaxConcurrentStreams = true + } } |
