mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-18 05:58:19 +00:00
Use Ipv6::to_ipv4_mapped
in mastersrv
Needs Rust 1.63.0, should be old enough at this point.
This commit is contained in:
parent
75d2b82ccd
commit
d42ae75a9e
|
@ -1009,11 +1009,8 @@ 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() {
|
||||
addr = IpAddr::from(v4);
|
||||
}
|
||||
if let Some(v4) = v6.to_ipv4_mapped() {
|
||||
addr = IpAddr::from(v4);
|
||||
}
|
||||
}
|
||||
Ok(addr)
|
||||
|
|
Loading…
Reference in a new issue