From 4e097c643deee1ebabe7ae69fe4dce02bbf798ff Mon Sep 17 00:00:00 2001 From: Tonis Tiigi Date: Fri, 19 Jan 2024 17:06:43 -0800 Subject: [PATCH] socket: return from loop after EOF Signed-off-by: Tonis Tiigi (cherry picked from commit 8cd3b00420a3c4e8c731f2f0c117e3d3fe0b4e32) Signed-off-by: Sebastiaan van Stijn --- cli-plugins/socket/socket.go | 1 + 1 file changed, 1 insertion(+) diff --git a/cli-plugins/socket/socket.go b/cli-plugins/socket/socket.go index beb46ae3a3..93d7a87b28 100644 --- a/cli-plugins/socket/socket.go +++ b/cli-plugins/socket/socket.go @@ -65,6 +65,7 @@ func ConnectAndWait(cb func()) { _, err := conn.Read(b) if errors.Is(err, io.EOF) { cb() + return } } }()