forked from quic-go/quic-go
Don't call OnAlarm() if no alarm is set
This commit is contained in:
@@ -293,7 +293,7 @@ runLoop:
|
|||||||
}
|
}
|
||||||
|
|
||||||
now := time.Now()
|
now := time.Now()
|
||||||
if s.sentPacketHandler.GetAlarmTimeout().Before(now) {
|
if timeout := s.sentPacketHandler.GetAlarmTimeout(); !timeout.IsZero() && timeout.Before(now) {
|
||||||
// This could cause packets to be retransmitted, so check it before trying
|
// This could cause packets to be retransmitted, so check it before trying
|
||||||
// to send packets.
|
// to send packets.
|
||||||
s.sentPacketHandler.OnAlarm()
|
s.sentPacketHandler.OnAlarm()
|
||||||
|
|||||||
Reference in New Issue
Block a user