From 2a59cf49bc256a2a9c2a91c69bc5af9d16d46989 Mon Sep 17 00:00:00 2001 From: Vinicius Fortuna Date: Wed, 13 Nov 2024 11:12:48 -0500 Subject: [PATCH] Apply suggestions from code review --- x/disorder/writer.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/x/disorder/writer.go b/x/disorder/writer.go index b624d6d4..cd397e66 100644 --- a/x/disorder/writer.go +++ b/x/disorder/writer.go @@ -48,7 +48,7 @@ func (w *disorderWriter) Write(data []byte) (written int, err error) { // Setting number of hops to 1 will lead to data to get lost on host. err = w.tcpOptions.SetHopLimit(1) if err != nil { - return 0, fmt.Errorf("failed to set the hop limit to %d: %w", disorderHopN, err) + return 0, fmt.Errorf("failed to set the hop limit to 1: %w", err) } defer func() { @@ -59,7 +59,7 @@ func (w *disorderWriter) Write(data []byte) (written int, err error) { // The network filters will receive data out of order. err = w.tcpOptions.SetHopLimit(defaultHopLimit) if err != nil { - err = fmt.Errorf("failed to set the hop limit error %d: %w", defaultHopLimit, err) + err = fmt.Errorf("failed to set the hop limit %d: %w", defaultHopLimit, err) } }() }