Skip to content

Commit

Permalink
Ensure all bytes are written to result stream
Browse files Browse the repository at this point in the history
  • Loading branch information
shanemcd committed Apr 25, 2022
1 parent 8b88e0c commit 4c9f5ae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/workceptor/workceptor.go
Original file line number Diff line number Diff line change
Expand Up @@ -564,8 +564,8 @@ func (w *Workceptor) GetResults(ctx context.Context, unitID string, startPos int
}
}
if err == io.EOF {
stdoutSize := stdoutSize(unitdir)
if IsComplete(unit.Status().State) && stdoutSize >= unit.Status().StdoutSize {
unitStatus := unit.Status()
if IsComplete(unitStatus.State) && filePos >= unitStatus.StdoutSize {
logger.Debug("Stdout complete - closing channel for: %s \n", unitID)

return
Expand Down

0 comments on commit 4c9f5ae

Please sign in to comment.