mirror of
https://github.com/minio/minio.git
synced 2025-11-23 19:17:43 -05:00
add codespell action (#18818)
Original work here, #18474, refixed and updated.
This commit is contained in:
@@ -27,11 +27,11 @@ import (
|
||||
// convenient wrapper to drain any remaining data on response body.
|
||||
//
|
||||
// Subsequently this allows golang http RoundTripper
|
||||
// to re-use the same connection for future requests.
|
||||
// to reuse the same connection for future requests.
|
||||
func DrainBody(respBody io.ReadCloser) {
|
||||
// Callers should close resp.Body when done reading from it.
|
||||
// If resp.Body is not closed, the Client's underlying RoundTripper
|
||||
// (typically Transport) may not be able to re-use a persistent TCP
|
||||
// (typically Transport) may not be able to reuse a persistent TCP
|
||||
// connection to the server for a subsequent "keep-alive" request.
|
||||
if respBody != nil {
|
||||
// Drain any remaining Body and then close the connection.
|
||||
|
||||
Reference in New Issue
Block a user