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 98f701c commit fe046b3
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 @@ -519,6 +519,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 @@ -595,8 +597,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 fe046b3

Please sign in to comment.