From 64f45c2ea659e645ff35b48a85c51d51cbc88c36 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 e4c66459..6900131c 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 {