From fe046b3f4e60048b835010b7046bc04c28779ae7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viktor=20Tigerstr=C3=B6m?= Date: Tue, 7 Nov 2023 14:49:30 +0100 Subject: [PATCH] gbn: reset resendTicker on any msg --- gbn/gbn_conn.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gbn/gbn_conn.go b/gbn/gbn_conn.go index 27869d54..6614c355 100644 --- a/gbn/gbn_conn.go +++ b/gbn/gbn_conn.go @@ -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 { @@ -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 {