1. 27 Oct, 2014 1 commit
    • Ian Lance Taylor's avatar
      net: if a DNS lookup times out, forget that it is in flight · 77595e46
      Ian Lance Taylor authored
      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 #8602.
      
      LGTM=bradfitz
      R=bradfitz, mikioh.mikioh
      CC=golang-codereviews, r, rsc
      https://golang.org/cl/154610044
      77595e46
  2. 08 Sep, 2014 1 commit
  3. 31 Aug, 2013 2 commits
  4. 22 Aug, 2013 1 commit
  5. 14 Jun, 2013 1 commit
    • Brad Fitzpatrick's avatar
      net: coalesce duplicate in-flight DNS lookups · 61d3b2db
      Brad Fitzpatrick authored
      In Issue 5625, Russ says: "We should at least have a cache of
      inflight lookups, so that 100 simultaneous dials of one host
      name don't do the work 100x. That's easy and (assume we forget
      the answer once they all get it) doesn't pose any consistency
      problems. It just merges simultaneous work."
      
      This brings in singleflight (unexported) from Google /
      Camlistore, but without its tests. Maybe we should put it
      somewhere in the standard library. But not now.
      
      Update #5625
      
      R=golang-dev, iant, cespare, rsc, dave, rogpeppe, remyoudompheng
      CC=golang-dev
      https://golang.org/cl/10079043
      61d3b2db
  6. 08 Nov, 2012 1 commit
  7. 18 Oct, 2012 1 commit
  8. 10 Sep, 2012 1 commit
  9. 17 Jan, 2012 1 commit