Closed
Description
Using std::net::lookup_host seems to duplicate each IP in the result set.
prompt> ./main rust-lang.org
V4(72.8.141.90:0)
V4(72.8.141.90:0)
prompt> ./main google.com | sort
V4(74.125.28.100:0)
V4(74.125.28.100:0)
V4(74.125.28.101:0)
V4(74.125.28.101:0)
V4(74.125.28.102:0)
V4(74.125.28.102:0)
V4(74.125.28.113:0)
V4(74.125.28.113:0)
V4(74.125.28.138:0)
V4(74.125.28.138:0)
V4(74.125.28.139:0)
V4(74.125.28.139:0)
V6([2607:f8b0:400e:c04::66]:0)
V6([2607:f8b0:400e:c04::66]:0)
The documentation snippet (https://doc.rust-lang.org/std/net/fn.lookup_host.html) is enough to reproduce.
I also have a simple gist here: https://gist.github.com/nieksand/9c42100be6dc52df3305
I'm using the latest Rust from master branch on MacOS X 10.9.5. I have not checked on other platforms. I see this for any hostname that I try, so I don't think it's a problem on the nameserver side.
Expected behavior is seeing each IP address listed only once.
Metadata
Metadata
Assignees
Labels
No labels