Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
fortuna authored Nov 13, 2024
1 parent 32477fd commit 2a59cf4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions x/disorder/writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand All @@ -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)
}
}()
}
Expand Down

0 comments on commit 2a59cf4

Please sign in to comment.