Lock while getting doh/doh3 transport

This commit is contained in:
Cuong Manh Le
2023-05-15 20:54:01 +07:00
committed by Cuong Manh Le
parent 704bc27dba
commit 4c45e6cf3d
3 changed files with 4 additions and 5 deletions
-5
View File
@@ -21,13 +21,9 @@ const (
)
func newDohResolver(uc *UpstreamConfig) *dohResolver {
uc.mu.Lock()
transport := uc.transport
uc.mu.Unlock()
r := &dohResolver{
endpoint: uc.u,
isDoH3: uc.Type == ResolverTypeDOH3,
transport: transport,
http3RoundTripper: uc.http3RoundTripper,
sendClientInfo: uc.UpstreamSendClientInfo(),
uc: uc,
@@ -39,7 +35,6 @@ type dohResolver struct {
uc *UpstreamConfig
endpoint *url.URL
isDoH3 bool
transport *http.Transport
http3RoundTripper http.RoundTripper
sendClientInfo bool
}