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 13, 2023
1 parent 702ba1e commit 64f45c2
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 @@ -520,6 +520,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 @@ -596,8 +598,6 @@ func (g *GoBackNConn) receivePacketsForever() error { // nolint:gocyclo
)

if gotValidACK {
g.resendTicker.Reset(g.resendTimeout)

// Send a signal to indicate that new
// ACKs have been received.
select {
Expand Down

0 comments on commit 64f45c2

Please sign in to comment.