forked from TrueCloudLab/frostfs-node
[#607] network: Use Equal method in IsLocalAddress function
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
b2b33aeac9
commit
6de0af0650
1 changed files with 1 additions and 1 deletions
|
@ -129,7 +129,7 @@ func multiaddrStringFromHostAddr(host string) (string, error) {
|
||||||
// IsLocalAddress returns true if network endpoint from local address
|
// IsLocalAddress returns true if network endpoint from local address
|
||||||
// source is equal to network endpoint of passed address.
|
// source is equal to network endpoint of passed address.
|
||||||
func IsLocalAddress(src LocalAddressSource, addr *Address) bool {
|
func IsLocalAddress(src LocalAddressSource, addr *Address) bool {
|
||||||
return src.LocalAddress().ma.Equal(addr.ma)
|
return src.LocalAddress().Equal(addr)
|
||||||
}
|
}
|
||||||
|
|
||||||
// HostAddrFromMultiaddr converts "/dns4/localhost/tcp/8080" to "localhost:8080".
|
// HostAddrFromMultiaddr converts "/dns4/localhost/tcp/8080" to "localhost:8080".
|
||||||
|
|
Loading…
Reference in a new issue