Skip to content

Commit

Permalink
Don't call String in call to Debugf
Browse files Browse the repository at this point in the history
The call to String was being executed unconditionally, even when
logging was disabled.  Fortunately, it's not needed.
  • Loading branch information
jech authored and Sean-Der committed Apr 29, 2023
1 parent d2c2d83 commit 44ed465
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion association.go
Original file line number Diff line number Diff line change
Expand Up @@ -775,7 +775,7 @@ func (a *Association) gatherOutboundSackPackets(rawPackets [][]byte) [][]byte {
if a.ackState == ackStateImmediate {
a.ackState = ackStateIdle
sack := a.createSelectiveAckChunk()
a.log.Debugf("[%s] sending SACK: %s", a.name, sack.String())
a.log.Debugf("[%s] sending SACK: %s", a.name, sack)
raw, err := a.createPacket([]chunk{sack}).marshal()
if err != nil {
a.log.Warnf("[%s] failed to serialize a SACK packet", a.name)
Expand Down

0 comments on commit 44ed465

Please sign in to comment.