diff --git a/pkg/workceptor/remote_work.go b/pkg/workceptor/remote_work.go index 8ef54f766..ee203fca4 100644 --- a/pkg/workceptor/remote_work.go +++ b/pkg/workceptor/remote_work.go @@ -466,7 +466,7 @@ func (rw *remoteUnit) monitorRemoteStdout(mw *utils.JobContext) { return } }() - _, err = io.Copy(stdout, conn) + _, err = io.Copy(stdout, reader) close(doneChan) if err != nil { var errmsg string