only accept 3 retries

While the server is allowed to perform multiple Retries, the client
should impose a limit in order to avoid being caught in an endless loop.
This commit is contained in:
Marten Seemann
2018-08-14 18:35:25 +07:00
parent 872e1747f4
commit 9608e8563f
3 changed files with 65 additions and 1 deletions

View File

@@ -149,3 +149,6 @@ const MinPacingDelay time.Duration = 100 * time.Microsecond
// DefaultConnectionIDLength is the connection ID length that is used for multiplexed connections
// if no other value is configured.
const DefaultConnectionIDLength = 4
// MaxRetries is the maximum number of Retries a client will do before failing the connection.
const MaxRetries = 3