diff --git a/restapi.go b/restapi.go index 26da28652..887076fcb 100644 --- a/restapi.go +++ b/restapi.go @@ -142,7 +142,7 @@ func (s *Session) RequestWithLockedBucket(method, urlStr, contentType string, b } defer func() { err2 := resp.Body.Close() - if err2 != nil { + if s.Debug && err2 != nil { log.Println("error closing resp body") } }()