use the connection ID from the preferred_address transport parameter

This commit is contained in:
Marten Seemann 2020-03-05 09:29:46 +07:00
parent ce64c6b301
commit eab5adc48c
4 changed files with 61 additions and 39 deletions

View file

@ -1196,7 +1196,7 @@ func (s *session) processTransportParameters(params *handshake.TransportParamete
if params.PreferredAddress != nil {
s.logger.Debugf("Server sent preferred_address. Retiring the preferred_address connection ID.")
// Retire the connection ID.
s.framer.QueueControlFrame(&wire.RetireConnectionIDFrame{SequenceNumber: 1})
s.connIDManager.AddFromPreferredAddress(params.PreferredAddress.ConnectionID, &params.PreferredAddress.StatelessResetToken)
}
// On the server side, the early session is ready as soon as we processed
// the client's transport parameters.