Descriptionnet: if a DNS lookup times out, forget that it is in flight
Before this CL, if the system resolver does a very slow DNS
lookup for a particular host, all subsequent requests for that
host will hang waiting for that lookup to complete. That is
more or less expected when Dial is called with no deadline.
When Dial has a deadline, though, we can accumulate a large
number of goroutines waiting for that slow DNS lookup. Try to
avoid this problem by restarting the DNS lookup when it is
redone after a deadline is passed.
This CL also avoids creating an extra goroutine purely to
handle the deadline.
No test because we would have to simulate a slow DNS lookup
followed by a fast DNS lookup.
Fixes issue 8602.
Patch Set 1 #Patch Set 2 : diff -r fdbba39326c8d1431fc09ffdbdd20a83f209fdcd https://code.google.com/p/go #Patch Set 3 : diff -r 366de8a6a8cf77f3ae3a0ac97860afd9dbc816a9 https://code.google.com/p/go #Patch Set 4 : diff -r 366de8a6a8cf77f3ae3a0ac97860afd9dbc816a9 https://code.google.com/p/go #
Total comments: 1
Patch Set 5 : diff -r 5ceb818e1ebf3ee4496a158d36d51199ff926111 https://code.google.com/p/go #Patch Set 6 : diff -r 207a56999953fec99622802b5002cc65c7a2f833 https://code.google.com/p/go #MessagesTotal messages: 8
|