• Ian Lance Taylor's avatar
    net: use DialTimeout in TestSelfConnect · 4aa521a7
    Ian Lance Taylor authored
    This avoids problems with systems that take a long time to
    find out nothing is listening, while still testing for the
    self-connect misfeature since a self-connect should be fast.
    With this we may be able to remove the test for non-Linux
    systems.
    
    Tested (on GNU/Linux) by editing selfConnect in
    tcpsock_posix.go to always return false and verifying that
    TestSelfConnect then fails with and without this change.
    
    Idea from Uros Bizjak.
    
    R=golang-codereviews, bradfitz
    CC=golang-codereviews
    https://golang.org/cl/39200044
    4aa521a7
Name
Last commit
Last update
..
cmd Loading commit data...
lib9 Loading commit data...
libbio Loading commit data...
liblink Loading commit data...
libmach Loading commit data...
pkg Loading commit data...
Make.dist Loading commit data...
all.bash Loading commit data...
all.bat Loading commit data...
all.rc Loading commit data...
clean.bash Loading commit data...
clean.bat Loading commit data...
clean.rc Loading commit data...
make.bash Loading commit data...
make.bat Loading commit data...
make.rc Loading commit data...
race.bash Loading commit data...
race.bat Loading commit data...
run.bash Loading commit data...
run.bat Loading commit data...
run.rc Loading commit data...
sudo.bash Loading commit data...