From 44e550ea72f673fadeae0559a773feb9cbf3eec6 Mon Sep 17 00:00:00 2001 From: Zadkiel Aharonian Date: Wed, 29 Nov 2023 15:33:08 +0100 Subject: [PATCH] fix: remove tcpproxy copy error handling --- pkg/tcpproxy/tcp.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pkg/tcpproxy/tcp.go b/pkg/tcpproxy/tcp.go index eda4a27467..fba4d21be8 100644 --- a/pkg/tcpproxy/tcp.go +++ b/pkg/tcpproxy/tcp.go @@ -125,9 +125,8 @@ func (p *TCPProxy) Handle(conn net.Conn) { func pipe(client, server net.Conn) { doCopy := func(s, c net.Conn, cancel chan<- bool) { - if _, err := io.Copy(s, c); err != nil { - klog.Errorf("Error copying data: %v", err) - } + //nolint:errcheck // No need to catch these errors + io.Copy(s, c) cancel <- true }