only send Public Reset after a timeout

fixes #471
This commit is contained in:
Marten Seemann
2017-03-08 15:50:37 +07:00
parent 622e856e3f
commit eb7ed2624a
3 changed files with 76 additions and 39 deletions

View File

@@ -23,6 +23,10 @@ const InitialCongestionWindow = 32
// session queues for later until it sends a public reset.
const MaxUndecryptablePackets = 10
// PublicResetTimeout is the time to wait before sending a Public Reset when receiving too many undecryptable packets during the handshake
// This timeout allows the Go scheduler to switch to the Go rountine that reads the crypto stream and to escalate the crypto
const PublicResetTimeout = 500 * time.Millisecond
// AckSendDelay is the maximum delay that can be applied to an ACK for a retransmittable packet
// This is the value Chromium is using
const AckSendDelay = 25 * time.Millisecond