Skip to content

Commit

Permalink
Merge branch 'master' into AG-23599-use-hostsfile-vol.2
Browse files Browse the repository at this point in the history
  • Loading branch information
EugeneOne1 committed Oct 11, 2023
2 parents b10f900 + b4abccf commit 0e6e9ad
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
6 changes: 3 additions & 3 deletions upstream/doh.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,11 +185,11 @@ func (p *dnsOverHTTPS) Close() (err error) {

runtime.SetFinalizer(p, nil)

if p.client == nil {
return nil
if p.client != nil {
err = p.closeClient(p.client)
}

return p.closeClient(p.client)
return err
}

// closeClient cleans up resources used by client if necessary. Note, that at
Expand Down
6 changes: 1 addition & 5 deletions upstream/dot.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,11 +141,7 @@ func (p *dnsOverTLS) Close() (err error) {
}
}

if len(closeErrs) > 0 {
return errors.List("closing tls conns", closeErrs...)
}

return nil
return errors.Join(closeErrs...)
}

// conn returns the first available connection from the pool if there is any, or
Expand Down

0 comments on commit 0e6e9ad

Please sign in to comment.