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 17, 2023
1 parent a87bfb9 commit f6bdd4a
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 @@ -529,6 +529,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 @@ -605,8 +607,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 f6bdd4a

Please sign in to comment.