From b7aaba911d58d8c695eef9fd416ebc2b7a3d799a Mon Sep 17 00:00:00 2001 From: Vinicius Fortuna Date: Thu, 7 Nov 2024 12:17:35 -0500 Subject: [PATCH] Rename --- x/sockopt/sockopt.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/x/sockopt/sockopt.go b/x/sockopt/sockopt.go index 94ca4037..44cb575e 100644 --- a/x/sockopt/sockopt.go +++ b/x/sockopt/sockopt.go @@ -68,13 +68,13 @@ func newHopLimit(conn net.Conn) (*hopLimitOption, error) { opt := &hopLimitOption{} switch { case addr.Addr().Is4(): - conn := ipv4.NewConn(conn) - opt.hopLimit = conn.TTL - opt.setHopLimit = conn.SetTTL + ipConn := ipv4.NewConn(conn) + opt.hopLimit = ipConn.TTL + opt.setHopLimit = ipConn.SetTTL case addr.Addr().Is6(): - conn := ipv6.NewConn(conn) - opt.hopLimit = conn.HopLimit - opt.setHopLimit = conn.SetHopLimit + ipConn := ipv6.NewConn(conn) + opt.hopLimit = ipConn.HopLimit + opt.setHopLimit = ipConn.SetHopLimit default: return nil, fmt.Errorf("address is not IPv4 or IPv6 (%v)", addr.Addr().String()) }