Skip to content

Commit

Permalink
judge maxidleconns int(0) pointer
Browse files Browse the repository at this point in the history
  • Loading branch information
wanglixiang01 authored and yndu13 committed May 8, 2023
1 parent 712238a commit cb3a42b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tea/tea.go
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ func getHttpTransport(req *Request, runtime *RuntimeObject) (*http.Transport, er
} else {
trans.DialContext = setDialContext(runtime)
}
if runtime.MaxIdleConns != nil {
if runtime.MaxIdleConns != nil && *runtime.MaxIdleConns > 0 {
trans.MaxIdleConns = IntValue(runtime.MaxIdleConns)
trans.MaxIdleConnsPerHost = IntValue(runtime.MaxIdleConns)
}
Expand Down

0 comments on commit cb3a42b

Please sign in to comment.