Actions
Bug #11134
closedresolution of "localhost" in windows server 2012 (ipv6 over ipv4)
Description
I've just installed ruby 2.2 on Windows Server 2012 and i'm seeing this strange behaviour:
The server:
require "socket"
server = TCPServer.new("::1", 2000)
loop do
client = server.accept
client.puts "Hello !"
client.close
end
in this case, a tcp connection to that server (using "localhost") goes fine, e.g.
TCPSocket.new("localhost", 2000).close # => processed instantly
BUT if the server bind on 127.0.0.1 or 0.0.0.0 (instead of ::1) the previous request takes at least 1 second to be processed.
The same occurs in windows server 2008, but there it can be fixed inserting the line "127.0.0.1 localhost" into the hosts file while in windows server 2012 the delay persists.
Actions
Like0
Like0