Skip to content

Commit

Permalink
On Read Retransmit send FSM to SENDING
Browse files Browse the repository at this point in the history
RFC6347 Section-4.2.4 states

```
The implementation reads a retransmitted flight from the peer: the
implementation transitions to the SENDING state, where it
retransmits the flight, resets the retransmit timer, and returns
to the WAITING state.  The rationale here is that the receipt of a
duplicate message is the likely result of timer expiry on the peer
and therefore suggests that part of one's previous flight was
lost.
```

Resolves #478
  • Loading branch information
Sean-Der committed Jul 11, 2024
1 parent a6d9640 commit b10fe9a
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions handshaker.go
Original file line number Diff line number Diff line change
Expand Up @@ -294,13 +294,18 @@ func (s *handshakeFSM) wait(ctx context.Context, c flightConn) (handshakeState,
if err != nil {
return handshakeErrored, err
}

s.cfg.log.Tracef("[handshake:%s] %s -> %s", srvCliStr(s.state.isClient), s.currentFlight.String(), nextFlight.String())
if nextFlight == 0 {
break
if s.currentFlight == flight5 {
break
}
return handshakeSending, nil
}
s.cfg.log.Tracef("[handshake:%s] %s -> %s", srvCliStr(s.state.isClient), s.currentFlight.String(), nextFlight.String())
if nextFlight.isLastRecvFlight() && s.currentFlight == nextFlight {
return handshakeFinished, nil
}

s.currentFlight = nextFlight
return handshakePreparing, nil

Expand Down

0 comments on commit b10fe9a

Please sign in to comment.