fix: close transport with doh of h3
This commit is contained in:
parent
61d9fa1708
commit
dd66f8826c
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 = nil
|
||||
}
|
||||
} else {
|
||||
if dc.firstTest.CAS(true, false) {
|
||||
dc.supportH3.Store(true)
|
||||
_ = dc.transport.CloseIdleConnections
|
||||
dc.transport = nil
|
||||
}
|
||||
}
|
||||
} else {
|
||||
msg, err = dc.doRequestWithTransport(req, dc.transport)
|
||||
|
|
Loading…
Reference in a new issue