Merge pull request #10690 from aslafy-z/patch-3

fix: remove tcpproxy copy error handling
This commit is contained in:
James Strong 2023-12-01 09:47:38 -05:00 committed by GitHub
commit 60046bf7e1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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
}