summaryrefslogtreecommitdiff
path: root/src/net/singleflight.go
Commit message (Collapse)AuthorAgeFilesLines
* net: if a DNS lookup times out, forget that it is in flightIan Lance Taylor2014-10-271-5/+61
| | | | | | | | | | | | | | | | | | | | | | | | 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. LGTM=bradfitz R=bradfitz, mikioh.mikioh CC=golang-codereviews, r, rsc https://codereview.appspot.com/154610044
* build: move package sources from src/pkg to srcRuss Cox2014-09-081-0/+53
Preparation was in CL 134570043. This CL contains only the effect of 'hg mv src/pkg/* src'. For more about the move, see golang.org/s/go14nopkg.