diff --git a/gbn/gbn_conn.go b/gbn/gbn_conn.go index bd621b5a..3dcb8913 100644 --- a/gbn/gbn_conn.go +++ b/gbn/gbn_conn.go @@ -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 { @@ -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 {