From f47a8245b46ef0d09a4506c0916928cd6b3ccafc Mon Sep 17 00:00:00 2001 From: jdl Date: Wed, 25 Dec 2024 10:39:42 +0100 Subject: [PATCH] Small bug fixes. --- node/peer-supervisor.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/node/peer-supervisor.go b/node/peer-supervisor.go index 76e329c..9a587e8 100644 --- a/node/peer-supervisor.go +++ b/node/peer-supervisor.go @@ -152,6 +152,9 @@ func (s *peerSupervisor) server() stateFunc { timeoutTimer = time.NewTimer(timeoutInterval) ) + // Timer will be restarted once we have established a connection. + timeoutTimer.Stop() + for { select { case peer := <-s.peerUpdates: @@ -161,6 +164,8 @@ func (s *peerSupervisor) server() stateFunc { switch p := pkt.Payload.(type) { case synPacket: + timeoutTimer.Reset(timeoutInterval) + // Before we can respond to this packet, we need to make sure the // route is setup properly. //