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,13 +1009,10 @@ async fn main() {
|
|||
addr.unwrap().ip()
|
||||
};
|
||||
if let IpAddr::V6(v6) = addr {
|
||||
if let Some(v4) = v6.to_ipv4() {
|
||||
// TODO: switch to `to_ipv4_mapped` in the future.
|
||||
if !v6.is_loopback() {
|
||||
if let Some(v4) = v6.to_ipv4_mapped() {
|
||||
addr = IpAddr::from(v4);
|
||||
}
|
||||
}
|
||||
}
|
||||
Ok(addr)
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue