Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

introduce a quic.Config.HandshakeIdleTimeout, remove HandshakeTimeout #2930

Merged
merged 1 commit into from
Dec 15, 2020

Conversation

marten-seemann
Copy link
Member

@marten-seemann marten-seemann commented Dec 8, 2020

Fixes #1681.

There's a subtle difference between a handshake timeout and the handshake idle timeout: The handshake timeout fires a fixed time after the handshake started, and kills the connection if the handshake hasn't completed by that time.
The handshake idle timeout functions like the normal idle timeout, just with a shorter time for the time before handshake completion.

Ideally, the handshake idle timeout should be shorter than the handshake timeout. We ensure this by setting it to max(10s, handshake idle timeout).
This way, we'll be able to give up dialing a peer that's not listening at all earlier. So far, we'd have to wait for the handshake timeout (10s) to finally give up. That's a long time. Now the rule is: If we don't receive any valid QUIC packet for 5 seconds, we give up.

@codecov
Copy link

codecov bot commented Dec 8, 2020

Codecov Report

Merging #2930 (595f6f8) into master (deacefd) will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2930      +/-   ##
==========================================
+ Coverage   86.22%   86.22%   +0.01%     
==========================================
  Files         132      132              
  Lines        9141     9145       +4     
==========================================
+ Hits         7881     7885       +4     
  Misses        910      910              
  Partials      350      350              
Impacted Files Coverage Δ
config.go 100.00% <100.00%> (ø)
session.go 79.47% <100.00%> (+0.07%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update deacefd...595f6f8. Read the comment docs.

@marten-seemann marten-seemann merged commit 4c0f0c4 into master Dec 15, 2020
@marten-seemann marten-seemann deleted the handshake-idle-timeout branch December 15, 2020 03:07
@aschmahmann aschmahmann mentioned this pull request May 14, 2021
71 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

implement a better timeout for dialing connections
2 participants