Skip to content

Commit

Permalink
discovery: correctly format ipv6 addresses from dns seed
Browse files Browse the repository at this point in the history
  • Loading branch information
MDrollette authored and Roasbeef committed Dec 22, 2017
1 parent b74b9fc commit d6172ca
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions discovery/bootstrapper.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"crypto/sha256"
"fmt"
"net"
"strconv"
"strings"

"github.com/davecgh/go-spew/spew"
Expand Down Expand Up @@ -441,8 +442,8 @@ search:
// Finally we'll convert the host:port peer to
// a proper TCP address to use within the
// lnwire.NetAddress.
addr := fmt.Sprintf("%v:%v", addrs[0],
nodeSrv.Port)
addr := net.JoinHostPort(addrs[0],
strconv.FormatUint(uint64(nodeSrv.Port), 10))
tcpAddr, err := net.ResolveTCPAddr("tcp", addr)
if err != nil {
return nil, err
Expand Down

0 comments on commit d6172ca

Please sign in to comment.