Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
net: on windows, net.Dial with udp times out immediately #5349
What steps will reproduce the problem? http://play.golang.org/p/k-9aiSXzQ6 What is the expected output? Nothing What do you see instead? dial udp localhost:514: i/o timeout Which compiler are you using (5g, 6g, 8g, gccgo)? 6g Which operating system are you using? Windows 7 amd64 Which version are you using? (run 'go version') tip (d4c3e6c8b141) Please provide any additional information below. I've traced the problem back to revision 64df8d0 (https://code.google.com/p/go/source/browse/src/pkg/net/dial_gen.go?spec=svn64df8d0a25d3ecacf8a9518047e21cc0e75edb38&;r=64df8d0a25d3ecacf8a9518047e21cc0e75edb38). resolveAndDialChannel in dial_gen.go does not check for a Zero time and sets the timer to 0 causing an immediate timeout. The udp Dial hits this path because it cannot use ConnectEx. I would fix this myself but I don't really know if removing the timer completely in this case is the correct course of action. I assume this also affects net.Dial with all network types on plan9.