Skip to content

Commit

Permalink
Merge pull request #600 from shanemcd/write-all-bytes
Browse files Browse the repository at this point in the history
Ensure all bytes are written to result stream
  • Loading branch information
shanemcd authored Apr 25, 2022
2 parents 1fd0457 + e7ef918 commit aead0ba
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 aead0ba

Please sign in to comment.