From 2e02922d784d191fb4650d1d87027b0f7b16cfa9 Mon Sep 17 00:00:00 2001 From: Matthew Sandoval Date: Thu, 17 Oct 2024 08:48:41 -0700 Subject: [PATCH] Fix payload debug hung job (#1173) --- pkg/workceptor/command.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pkg/workceptor/command.go b/pkg/workceptor/command.go index f0fe9dfbb..335362d62 100644 --- a/pkg/workceptor/command.go +++ b/pkg/workceptor/command.go @@ -126,9 +126,6 @@ func commandRunner(command string, params string, unitdir string) error { } var payload string reader := bufio.NewReader(stdin) - if err != nil { - return err - } for { response, err := reader.ReadString('\n') @@ -144,6 +141,7 @@ func commandRunner(command string, params string, unitdir string) error { MainInstance.nc.GetLogger().DebugPayload(payloadDebug, payload, workUnitID, "") io.WriteString(stdinStream, payload) + stdinStream.Close() } else { cmd.Stdin = stdin }