Skip to content

Commit b23fb5b

Browse files
committed
More
1 parent 2cbe26f commit b23fb5b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

client.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,12 @@ func NewClient(config Config) (P2PClient, error) {
110110
if len(publicAddrs) == 0 {
111111
// If no public addresses are set, let's attempt to grab it publicly
112112
// Ignore errors because we don't care if we can't find it
113-
ifconfig, _ := GetPublicIP(context.Background())
113+
ifconfig, err := GetPublicIP(context.Background())
114+
if err != nil {
115+
logger.Infof("Failed to get public IP address: %v", err)
116+
}
114117
if len(ifconfig) > 0 {
118+
logger.Infof("Public IP address: %v", ifconfig)
115119
addr, _ := multiaddr.NewMultiaddr(fmt.Sprintf("/ip4/%s/tcp/%s", ifconfig, config.Port))
116120
if addr != nil {
117121
publicAddrs = append(publicAddrs, addr)

0 commit comments

Comments
 (0)