Skip to content

Commit

Permalink
fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
abhishek9686 committed Mar 5, 2025
1 parent 806c55b commit 3d2cf17
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions networking/server-pong.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,22 +29,22 @@ func InitialiseIfaceMetricsServer(ctx context.Context, wg *sync.WaitGroup) {
}

// startIfaceDetection - starts server to listen for best endpoints between netclients
func startIfaceDetection(ctx context.Context, wg *sync.WaitGroup, port, protocal int) {
func startIfaceDetection(ctx context.Context, wg *sync.WaitGroup, port, protocol int) {
defer wg.Done()
tcpAddr, err := net.ResolveTCPAddr("tcp4", fmt.Sprintf("0.0.0.0:%d", port))
if err != nil {
logger.Log(0, "failed to resolve iface detection address -", err.Error())
return
}
if protocal == 6 {
if protocol == 6 {
tcpAddr, err = net.ResolveTCPAddr("tcp6", fmt.Sprintf("[::]:%d", port))
if err != nil {
logger.Log(0, "failed to resolve iface detection address -", err.Error())
return
}
}
network := "tcp4"
if protocal == 6 {
if protocol == 6 {
network = "tcp6"
}
l, err := net.ListenTCP(network, tcpAddr)
Expand Down

0 comments on commit 3d2cf17

Please sign in to comment.