Tom Bergan 945ddfdd3b http2: retry requests after receiving REFUSED STREAM
RoundTrip will retry a request if it receives REFUSED_STREAM. To guard
against servers that use REFUSED_STREAM to encourage rate limiting, or
servers that return REFUSED_STREAM deterministically for some requests,
we retry after an exponential backoff and we cap the number of retries.

The exponential backoff starts on the second retry, with a backoff
sequence of 1s, 2s, 4s, etc, with 10% random jitter.

The retry cap was set to 6, somewhat arbitrarily. Rationale: this is
what Firefox does.

Updates golang/go#20985

Change-Id: I4dcac4392ac4a3220d6d839f28bf943fe6b3fea7
Reviewed-on: https://go-review.googlesource.com/50471
Run-TryBot: Tom Bergan <tombergan@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-08-08 00:11:46 +00:00
2017-06-13 04:21:24 +00:00
2016-01-08 17:00:32 +00:00
2017-06-21 08:22:27 +00:00
2017-06-27 09:35:25 +00:00
2017-05-09 22:28:08 +00:00
2017-02-01 21:02:21 +00:00
2014-12-08 10:44:07 +11:00
2015-03-18 17:04:12 +00:00
2015-02-18 23:42:41 +00:00
2012-03-17 15:20:00 +11:00
2012-01-25 15:31:30 -05:00

This repository holds supplementary Go networking libraries.

To submit changes to this repository, see http://golang.org/doc/contribute.html.
Description
[mirror] Go supplementary network libraries
Readme BSD-3-Clause 13 MiB
Languages
Go 99.9%