1
0
mirror of https://github.com/astaxie/beego.git synced 2024-06-10 03:33:34 +00:00

Merge pull request #1900 from redfoxli/patch-1

close socket when http client request over
This commit is contained in:
astaxie 2016-08-02 10:01:53 +08:00 committed by GitHub
commit 74778bb9d4

View File

@ -412,6 +412,7 @@ func (b *BeegoHTTPRequest) DoRequest() (*http.Response, error) {
TLSClientConfig: b.setting.TLSClientConfig, TLSClientConfig: b.setting.TLSClientConfig,
Proxy: b.setting.Proxy, Proxy: b.setting.Proxy,
Dial: TimeoutDialer(b.setting.ConnectTimeout, b.setting.ReadWriteTimeout), Dial: TimeoutDialer(b.setting.ConnectTimeout, b.setting.ReadWriteTimeout),
MaxIdleConnsPerHost: -1,
} }
} else { } else {
// if b.transport is *http.Transport then set the settings. // if b.transport is *http.Transport then set the settings.