From 5c2ea259b827bbbde3f951dabc2b4f5420f8934a Mon Sep 17 00:00:00 2001 From: Ivan Date: Thu, 20 Nov 2025 21:45:10 -0600 Subject: [PATCH] refactor: replace log statements with debug logging for packet resend errors in channel.go --- pkg/channel/channel.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/channel/channel.go b/pkg/channel/channel.go index 9c33aa8..4efbc1b 100644 --- a/pkg/channel/channel.go +++ b/pkg/channel/channel.go @@ -2,11 +2,11 @@ package channel import ( "errors" - "log" "math" "sync" "time" + "github.com/Sudo-Ivan/reticulum-go/pkg/debug" "github.com/Sudo-Ivan/reticulum-go/pkg/transport" ) @@ -141,7 +141,7 @@ func (c *Channel) handleTimeout(packet interface{}) { env.Tries++ if err := c.link.Resend(packet); err != nil { // #nosec G104 // Handle resend error, e.g., log it or mark envelope as failed - log.Printf("Failed to resend packet: %v", err) + debug.Log(debug.DEBUG_INFO, "Failed to resend packet", "error", err) // Optionally, mark the envelope as failed or remove it from txRing // env.State = MsgStateFailed // c.txRing = append(c.txRing[:i], c.txRing[i+1:]...)