fix: close transport with doh of h3
This commit is contained in:
parent
50f2ecbcb0
commit
503b1efd8a
1 changed files with 6 additions and 0 deletions
|
@ -78,6 +78,12 @@ func (dc *dohClient) doRequest(req *http.Request) (msg *D.Msg, err error) {
|
||||||
_ = dc.h3Transport.Close()
|
_ = dc.h3Transport.Close()
|
||||||
dc.h3Transport = nil
|
dc.h3Transport = nil
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
if dc.firstTest.CAS(true, false) {
|
||||||
|
dc.supportH3.Store(true)
|
||||||
|
_ = dc.transport.CloseIdleConnections
|
||||||
|
dc.transport = nil
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
msg, err = dc.doRequestWithTransport(req, dc.transport)
|
msg, err = dc.doRequestWithTransport(req, dc.transport)
|
||||||
|
|
Loading…
Reference in a new issue