fix: close transport with doh of h3

This commit is contained in:
gVisor bot 2022-07-03 23:01:49 +08:00
parent 61d9fa1708
commit dd66f8826c

View file

@ -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)