From 6973d716972f12eedffb38aea17462e724f48fc7 Mon Sep 17 00:00:00 2001 From: Marten Seemann Date: Mon, 10 Jul 2017 20:41:03 +0800 Subject: [PATCH] remove unneeded if statement in session.logPacket --- session.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/session.go b/session.go index e7e67183..0ed50381 100644 --- a/session.go +++ b/session.go @@ -716,11 +716,9 @@ func (s *session) logPacket(packet *packedPacket) { // We don't need to allocate the slices for calling the format functions return } - if utils.Debug() { - utils.Debugf("-> Sending packet 0x%x (%d bytes) for connection %x, %s", packet.number, len(packet.raw), s.connectionID, packet.encryptionLevel) - for _, frame := range packet.frames { - frames.LogFrame(frame, true) - } + utils.Debugf("-> Sending packet 0x%x (%d bytes) for connection %x, %s", packet.number, len(packet.raw), s.connectionID, packet.encryptionLevel) + for _, frame := range packet.frames { + frames.LogFrame(frame, true) } }