From 690fabddafbcd6e82605c3eda82a98be3bd9a5d0 Mon Sep 17 00:00:00 2001 From: onyx-and-iris Date: Thu, 21 Mar 2024 07:35:07 +0000 Subject: [PATCH] no need to split and rejoin here. --- pkg/udpproxy/session.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pkg/udpproxy/session.go b/pkg/udpproxy/session.go index 829dc7a..b331efb 100644 --- a/pkg/udpproxy/session.go +++ b/pkg/udpproxy/session.go @@ -85,9 +85,8 @@ func (s *Session) proxyFrom(buf []byte) error { return err } - if s.isRconResponsePacket(buf) && log.GetLevel() == log.DebugLevel { - parts := strings.Split(string(buf[10:]), " ") - log.Debugf("Response: %s", strings.Join(parts, " ")) + if s.isRconResponsePacket(buf) { + log.Debugf("Response: %s", string(buf[10:])) } return nil