forked from quic-go/quic-go
cancel the PTO timer when all Handshake packets are acknowledged
This commit is contained in:
@@ -536,6 +536,13 @@ func (h *sentPacketHandler) setLossDetectionTimer() {
|
||||
// PTO alarm
|
||||
ptoTime, encLevel, ok := h.getPTOTimeAndSpace()
|
||||
if !ok {
|
||||
if !oldAlarm.IsZero() {
|
||||
h.alarm = time.Time{}
|
||||
h.logger.Debugf("Canceling loss detection timer. No PTO needed..")
|
||||
if h.tracer != nil {
|
||||
h.tracer.LossTimerCanceled()
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
h.alarm = ptoTime
|
||||
|
||||
Reference in New Issue
Block a user