fix: ensure doh connections are closed when it is disabled

This commit is contained in:
James Houlahan
2020-06-17 10:52:53 +02:00
parent 9241a9bdbf
commit 02804d067c
7 changed files with 33 additions and 6 deletions

View File

@ -198,6 +198,10 @@ func (c *client) clearKeys() {
}
}
func (c *client) CloseConnections() {
c.hc.CloseIdleConnections()
}
// Do makes an API request. It does not check for HTTP status code errors.
func (c *client) Do(req *http.Request, retryUnauthorized bool) (res *http.Response, err error) {
// Copy the request body in case we need to retry it.