]> Cypherpunks repositories - gostls13.git/commit
net: make concurrent resolver lookups independent
authorGrégoire Delattre <gregoire.delattre@gmail.com>
Tue, 19 Dec 2017 18:42:12 +0000 (19:42 +0100)
committerBrad Fitzpatrick <bradfitz@golang.org>
Wed, 27 Jun 2018 20:28:14 +0000 (20:28 +0000)
commit63a4acba7d19a665f864b929eb8293858d1cee45
tree6ca9a71753643694c834130357199f80e6b0fffc
parent0246915fbfcc41870173b7f016dc7fa9437bbc13
net: make concurrent resolver lookups independent

The current resolver uses a global lookupGroup which merges LookupIPAddr
calls together for lookups for the same hostname if used concurrently.
As a result only one of the resolvers is actually used to perform the
DNS lookup but the result is shared by all the resolvers.

This commit limits the scope of the lookupGroup to the resolver itself
allowing each resolver to make its own requests without sharing the
result with other resolvers.

Fixes #22908

Change-Id: Ibba896eebb05e59f18ce4132564ea1f2b4b6c6d9
Reviewed-on: https://go-review.googlesource.com/80775
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/net/lookup.go
src/net/lookup_test.go