Skip to content

Commit 95d1fee

Browse files
committed
Fix ENHANCE_YOUR_CALM too_many_pings error for the proxy agent following https://blog.cloudflare.com/go-and-enhance-your-calm/
1 parent 05d659d commit 95d1fee

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

agent/utils/utils.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,7 @@ func postResponseWithRetries(client *http.Client, proxyURL, backendID, requestID
371371
}
372372
continue
373373
}
374+
io.Copy(io.Discard, proxyResp.Body)
374375
proxyResp.Body.Close()
375376
if 500 <= proxyResp.StatusCode && proxyResp.StatusCode < 600 {
376377
if _, seekErr := proxyReadSeeker.Seek(0, io.SeekStart); seekErr != nil {

0 commit comments

Comments
 (0)