mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-09 09:38:19 +00:00
Merge pull request #8697 from heinrich5991/pr_ddnet_to_ipv4_mapped
Use `Ipv6::to_ipv4_mapped` in mastersrv
This commit is contained in:
commit
9be9a902e7
|
@ -1009,11 +1009,8 @@ async fn main() {
|
||||||
addr.unwrap().ip()
|
addr.unwrap().ip()
|
||||||
};
|
};
|
||||||
if let IpAddr::V6(v6) = addr {
|
if let IpAddr::V6(v6) = addr {
|
||||||
if let Some(v4) = v6.to_ipv4() {
|
if let Some(v4) = v6.to_ipv4_mapped() {
|
||||||
// TODO: switch to `to_ipv4_mapped` in the future.
|
addr = IpAddr::from(v4);
|
||||||
if !v6.is_loopback() {
|
|
||||||
addr = IpAddr::from(v4);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Ok(addr)
|
Ok(addr)
|
||||||
|
|
Loading…
Reference in a new issue