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

Retransmit last flight when in finished #646

Closed
wants to merge 1 commit into from
Closed

Conversation

Sean-Der
Copy link
Member

When FSM is in finished and sees a handshake message re-send the last flight again.

@Sean-Der
Copy link
Member Author

Sean-Der commented Jul 12, 2024

@hasheddan @at-wat Looking at the spec I believe FINISHED can be simpler? If we see a handshake when in the FINISHED state do a RTX in case the remote lost the last message.

// [RFC6347 Section-4.2.4]
//                      +-----------+
//                +---> | PREPARING | <--------------------+
//                |     +-----------+                      |
//                |           |                            |
//                |           | Buffer next flight         |
//                |           |                            |
//                |          \|/                           |
//                |     +-----------+                      |
//                |     |  SENDING  |<------------------+  | Send
//                |     +-----------+                   |  | HelloRequest
//        Receive |           |                         |  |
//           next |           | Send flight             |  | or
//         flight |  +--------+                         |  |
//                |  |        | Set retransmit timer    |  | Receive
//                |  |       \|/                        |  | HelloRequest
//                |  |  +-----------+                   |  | Send
//                +--)--|  WAITING  |-------------------+  | ClientHello
//                |  |  +-----------+   Timer expires   |  |
//                |  |         |                        |  |
//                |  |         +------------------------+  |
//        Receive |  | Send           Read retransmit      |
//           last |  | last                                |
//         flight |  | flight                              |
//                |  |                                     |
//               \|/\|/                                    |
//            +-----------+                                |
//            | FINISHED  | -------------------------------+
//            +-----------+
//                 |  /|\
//                 |   |
//                 +---+
//              Read retransmit
//           Retransmit last flight

Copy link

codecov bot commented Jul 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.08%. Comparing base (602dc71) to head (f356763).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #646      +/-   ##
==========================================
- Coverage   80.12%   80.08%   -0.04%     
==========================================
  Files         101      101              
  Lines        5353     5328      -25     
==========================================
- Hits         4289     4267      -22     
- Misses        687      690       +3     
+ Partials      377      371       -6     
Flag Coverage Δ
go 80.11% <ø> (-0.04%) ⬇️
wasm 63.93% <ø> (-0.06%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

When FSM is in finished and sees a handshake message re-send the last
flight again.
@Sean-Der
Copy link
Member Author

@at-wat @hasheddan I’m gonna merge these tonight! I believe they will have zero impact

Comment on lines 227 to +229
// there should be no `Finished` last retransmit from client
if cntClientFinishedLastRetransmit != 0 {
t.Errorf("Number of client finished last retransmit is wrong, expected: %d times, got: %d times", 0, cntClientFinishedLastRetransmit)
if cntClientFinishedLastRetransmit != 4 {
t.Errorf("Number of client finished last retransmit is wrong, expected: %d times, got: %d times", 4, cntClientFinishedLastRetransmit)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it expected?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@at-wat sorry I messed up, I merged the other PR before seeing this comment.

Yes I believe so! It is getting retransmitted from the remote now. Before I think it was detecting handshake complete and not doing a rtx.

@Sean-Der Sean-Der closed this Jul 15, 2024
@Sean-Der Sean-Der deleted the simplify-finished branch July 15, 2024 03:41
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.

2 participants