From f2cfa15945375ee247d7fc479ac5cf8d022de18c Mon Sep 17 00:00:00 2001 From: xjasonlyu Date: Wed, 6 Apr 2022 17:26:02 +0800 Subject: [PATCH] Chore(tunnel): minify log message --- tunnel/tcp.go | 4 ++-- tunnel/udp.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tunnel/tcp.go b/tunnel/tcp.go index 7816116..9b922b4 100644 --- a/tunnel/tcp.go +++ b/tunnel/tcp.go @@ -56,7 +56,7 @@ func relay(left, right net.Conn) { go func() { defer wg.Done() if err := copyBuffer(right, left); err != nil { - log.Warnf("[TCP] copy buffer: %v", err) + log.Warnf("[TCP] %v", err) } right.SetReadDeadline(time.Now().Add(tcpWaitTimeout)) }() @@ -64,7 +64,7 @@ func relay(left, right net.Conn) { go func() { defer wg.Done() if err := copyBuffer(left, right); err != nil { - log.Warnf("[TCP] copy buffer: %v", err) + log.Warnf("[TCP] %v", err) } left.SetReadDeadline(time.Now().Add(tcpWaitTimeout)) }() diff --git a/tunnel/udp.go b/tunnel/udp.go index c059ba6..1a2df08 100644 --- a/tunnel/udp.go +++ b/tunnel/udp.go @@ -65,14 +65,14 @@ func relayPacket(left net.PacketConn, right net.PacketConn, to net.Addr) { go func() { defer wg.Done() if err := copyPacketBuffer(right, left, to, _udpSessionTimeout); err != nil { - log.Warnf("[UDP] copy packet buffer: %v", err) + log.Warnf("[UDP] %v", err) } }() go func() { defer wg.Done() if err := copyPacketBuffer(left, right, nil, _udpSessionTimeout); err != nil { - log.Warnf("[UDP] copy packet buffer: %v", err) + log.Warnf("[UDP] %v", err) } }()