Skip to content

Commit b392958

Browse files
committed
⚡ when high concurrency occurs, the connection is full and the connection is rejected.
1 parent 7d3be80 commit b392958

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

api/client.go

+1
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ func (c *httpClient) Do(ctx context.Context, req *http.Request) (*http.Response,
122122
if ctx != nil {
123123
req = req.WithContext(ctx)
124124
}
125+
defer c.client.CloseIdleConnections()
125126
resp, err := c.client.Do(req)
126127
defer func() {
127128
if resp != nil {

0 commit comments

Comments
 (0)