From 893b87958e886eae99b87e4bd835690719cf37c5 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 42238ad5..a6578764 100644 --- a/gbn/gbn_conn.go +++ b/gbn/gbn_conn.go @@ -602,6 +602,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 { @@ -675,8 +677,6 @@ func (g *GoBackNConn) receivePacketsForever() error { // nolint:gocyclo case *PacketACK: gotValidACK := g.sendQueue.processACK(m.Seq) if gotValidACK { - g.resendTicker.Reset(g.resendTimeout) - g.awaitingCatchUpMu.RLock() if m.Seq == g.awaitedACK && g.awaitingCatchUp { log.Tracef("Got awaited ACK")