Skip to content

Commit

Permalink
Use Interface listen address
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcoPolo committed Aug 1, 2024
1 parent ee0e8d3 commit ad98c91
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion p2p/protocol/identify/obsaddr.go
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,12 @@ func (o *ObservedAddrManager) appendInferredAddrs(twToObserverSets map[string][]
twToObserverSets[localTWStr] = append(twToObserverSets[localTWStr], o.getTopExternalAddrs(localTWStr)...)
}
}
for _, a := range o.listenAddrs() {
lAddrs, err := o.interfaceListenAddrs()
if err != nil {
log.Warnw("failed to get interface resolved listen addrs. Using just the listen addrs", "error", err)
lAddrs = o.listenAddrs()
}
for _, a := range lAddrs {
if _, ok := o.localAddrs[string(a.Bytes())]; ok {
// We already have this address in the list
continue
Expand Down

0 comments on commit ad98c91

Please sign in to comment.