We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2cbe26f commit b23fb5bCopy full SHA for b23fb5b
client.go
@@ -110,8 +110,12 @@ func NewClient(config Config) (P2PClient, error) {
110
if len(publicAddrs) == 0 {
111
// If no public addresses are set, let's attempt to grab it publicly
112
// Ignore errors because we don't care if we can't find it
113
- ifconfig, _ := GetPublicIP(context.Background())
+ ifconfig, err := GetPublicIP(context.Background())
114
+ if err != nil {
115
+ logger.Infof("Failed to get public IP address: %v", err)
116
+ }
117
if len(ifconfig) > 0 {
118
+ logger.Infof("Public IP address: %v", ifconfig)
119
addr, _ := multiaddr.NewMultiaddr(fmt.Sprintf("/ip4/%s/tcp/%s", ifconfig, config.Port))
120
if addr != nil {
121
publicAddrs = append(publicAddrs, addr)
0 commit comments