Skip to content

Commit

Permalink
rename sentPacketHandler.getEarliestLossTimeAndSpace to getLossTimeAn…
Browse files Browse the repository at this point in the history
…dSpace
  • Loading branch information
marten-seemann committed Jun 1, 2020
1 parent feb3e9a commit 96acf36
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions internal/ackhandler/sent_packet_handler.go
Expand Up @@ -399,7 +399,7 @@ func (h *sentPacketHandler) detectAndRemoveAckedPackets(ack *wire.AckFrame, encL
return ackedPackets, err
}

func (h *sentPacketHandler) getEarliestLossTimeAndSpace() (time.Time, protocol.EncryptionLevel) {
func (h *sentPacketHandler) getLossTimeAndSpace() (time.Time, protocol.EncryptionLevel) {
var encLevel protocol.EncryptionLevel
var lossTime time.Time

Expand All @@ -419,7 +419,7 @@ func (h *sentPacketHandler) getEarliestLossTimeAndSpace() (time.Time, protocol.E
return lossTime, encLevel
}

// same logic as getEarliestLossTimeAndSpace, but for lastAckElicitingPacketTime instead of lossTime
// same logic as getLossTimeAndSpace, but for lastAckElicitingPacketTime instead of lossTime
func (h *sentPacketHandler) getEarliestSentTimeAndSpace() (time.Time, protocol.EncryptionLevel) {
var encLevel protocol.EncryptionLevel
var sentTime time.Time
Expand Down Expand Up @@ -460,7 +460,7 @@ func (h *sentPacketHandler) hasOutstandingPackets() bool {

func (h *sentPacketHandler) setLossDetectionTimer() {
oldAlarm := h.alarm // only needed in case qlog is enabled
if lossTime, encLevel := h.getEarliestLossTimeAndSpace(); !lossTime.IsZero() {
if lossTime, encLevel := h.getLossTimeAndSpace(); !lossTime.IsZero() {
// Early retransmit timer or time loss detection.
h.alarm = lossTime
if h.qlogger != nil && h.alarm != oldAlarm {
Expand Down Expand Up @@ -586,7 +586,7 @@ func (h *sentPacketHandler) OnLossDetectionTimeout() error {
}

func (h *sentPacketHandler) onVerifiedLossDetectionTimeout() error {
earliestLossTime, encLevel := h.getEarliestLossTimeAndSpace()
earliestLossTime, encLevel := h.getLossTimeAndSpace()
if !earliestLossTime.IsZero() {
if h.logger.Debug() {
h.logger.Debugf("Loss detection alarm fired in loss timer mode. Loss time: %s", earliestLossTime)
Expand Down

0 comments on commit 96acf36

Please sign in to comment.