Lock while getting doh/doh3 transport

This commit is contained in:
Cuong Manh Le
2023-05-01 23:47:47 +07:00
committed by Cuong Manh Le
parent 704bc27dba
commit 4c45e6cf3d
3 changed files with 4 additions and 5 deletions
+2
View File
@@ -380,6 +380,8 @@ func (uc *UpstreamConfig) isControlD() bool {
}
func (uc *UpstreamConfig) dohTransport(dnsType uint16) http.RoundTripper {
uc.mu.Lock()
defer uc.mu.Unlock()
switch uc.IPStack {
case IpStackBoth, IpStackV4, IpStackV6:
return uc.transport