Skip to content

Commit

Permalink
fix: Fix debug message printing when debug is disabled. (#1043)
Browse files Browse the repository at this point in the history
  • Loading branch information
racerxdl committed Mar 29, 2022
1 parent dec22d7 commit 1292ea9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion restapi.go
Expand Up @@ -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")
}
}()
Expand Down

0 comments on commit 1292ea9

Please sign in to comment.