Skip to content

Commit

Permalink
gbn: reset resendTicker on any msg
Browse files Browse the repository at this point in the history
  • Loading branch information
ViktorTigerstrom committed Nov 7, 2023
1 parent 6b38b9e commit 893b879
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gbn/gbn_conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -602,6 +602,8 @@ func (g *GoBackNConn) receivePacketsForever() error { // nolint:gocyclo
g.pongTicker.Pause()
}

g.resendTicker.Reset(g.resendTimeout)

switch m := msg.(type) {
case *PacketData:
switch m.Seq == g.recvSeq {
Expand Down Expand Up @@ -675,8 +677,6 @@ func (g *GoBackNConn) receivePacketsForever() error { // nolint:gocyclo
case *PacketACK:
gotValidACK := g.sendQueue.processACK(m.Seq)
if gotValidACK {
g.resendTicker.Reset(g.resendTimeout)

g.awaitingCatchUpMu.RLock()
if m.Seq == g.awaitedACK && g.awaitingCatchUp {
log.Tracef("Got awaited ACK")
Expand Down

0 comments on commit 893b879

Please sign in to comment.