diff --git a/gbn/gbn_conn.go b/gbn/gbn_conn.go index b48af873..73c6079f 100644 --- a/gbn/gbn_conn.go +++ b/gbn/gbn_conn.go @@ -530,6 +530,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 { @@ -606,8 +608,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 {