From 4a7a7cfcc1322a0eed8196bcdc7b1b58560e3d86 Mon Sep 17 00:00:00 2001 From: Jim Minter Date: Fri, 23 Apr 2021 12:48:23 -0500 Subject: [PATCH] add tunnel fix which was missed in previous merge --- hack/tunnel/tunnel.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/hack/tunnel/tunnel.go b/hack/tunnel/tunnel.go index 16753e430..216a1b193 100644 --- a/hack/tunnel/tunnel.go +++ b/hack/tunnel/tunnel.go @@ -140,10 +140,12 @@ func run(ctx context.Context, log *logrus.Entry) error { _, _ = io.Copy(c2, c) }() - defer func() { - _ = c.(*tls.Conn).CloseWrite() + func() { + defer func() { + _ = c.(*tls.Conn).CloseWrite() + }() + _, _ = io.Copy(c, c2) }() - _, _ = io.Copy(c, c2) <-ch }(c)