From 8cd3b00420a3c4e8c731f2f0c117e3d3fe0b4e32 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 --- 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 beb46ae3a3e4..93d7a87b2849 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 } } }()