Skip to content

Commit 3c014ef

Browse files
RachelTuckerrpmoore
authored andcommitted
OTHER: was logging an error without checking if it was nil. Also was trying to pass in a uit64 as a string to formatted string. (#92)
1 parent 720b2f3 commit 3c014ef

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

helpers/getProducer.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,9 @@ func (producer *getProducer) transferOperationBuilder(info getObjectInfo) Transf
105105
}
106106
defer func() {
107107
err := getObjResponse.Content.Close()
108-
producer.Warningf("unable to close response body for object '%s' at offset '%s': %s", info.blob.Name(), info.blob.Offset(), err)
108+
if err != nil {
109+
producer.Warningf("unable to close response body for object '%s' at offset '%d': %s", info.blob.Name(), info.blob.Offset(), err)
110+
}
109111
}()
110112

111113
if len(blobRanges) == 0 {

0 commit comments

Comments
 (0)