diff options
| author | Shulhan <ms@kilabit.info> | 2018-10-01 11:52:32 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2018-10-01 11:52:32 +0700 |
| commit | 2aec82b746fe9dc448df60b48a86c5e9572b07d6 (patch) | |
| tree | ea355333757dd2d9eef2f4c34f199384e58ba35b | |
| parent | b16432d24a4aa133fcaa415761a057086c88ff3b (diff) | |
| download | pakakeh.go-2aec82b746fe9dc448df60b48a86c5e9572b07d6.tar.xz | |
lib/dns: use CloseIdleConnections method on transport
The CloseIdleConnections in http client is only available at current Go
tip at branch master.
| -rw-r--r-- | lib/dns/dohclient.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/dns/dohclient.go b/lib/dns/dohclient.go index 7de92672..fc9d4ed9 100644 --- a/lib/dns/dohclient.go +++ b/lib/dns/dohclient.go @@ -83,7 +83,7 @@ func NewDoHClient(nameserver string, allowInsecure bool) (*DoHClient, error) { // Close all idle connections. // func (cl *DoHClient) Close() error { - cl.conn.CloseIdleConnections() + cl.conn.Transport.(*http.Transport).CloseIdleConnections() return nil } |
