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.
The text was updated successfully, but these errors were encountered:
mikioh pushed a commit that referenced this issue
Apr 2, 2015
This change makes TestDialTimeout work on almost all the supported platforms. Updates #3016. Updates #3307. Updates #3867. Updates #5380. Updates #5349. Change-Id: Iacf0ebea23cdd8f6c0333d70c667a5a5f5eb0ed2 Reviewed-on: https://go-review.googlesource.com/8220 Reviewed-by: Ian Lance Taylor <email@example.com>
adg added a commit that referenced this issue
May 11, 2015
This issue was closed.