Skip to content

Commit

Permalink
fix: compare time chunks against zero (#235)
Browse files Browse the repository at this point in the history
  • Loading branch information
plyr4 committed Nov 8, 2021
1 parent 9445acf commit 5679bf2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
5 changes: 1 addition & 4 deletions executor/linux/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -256,11 +256,8 @@ func (c *client) StreamService(ctx context.Context, ctn *pipeline.Container) err
return
// channel is not closed
default:
// get the current size of log data
size := len(_log.GetData())

// update the existing log with the new bytes if there is new data to add
if len(logs.Bytes()) > size {
if len(logs.Bytes()) > 0 {
logger.Trace(logs.String())

// update the existing log with the new bytes
Expand Down
5 changes: 1 addition & 4 deletions executor/linux/step.go
Original file line number Diff line number Diff line change
Expand Up @@ -305,11 +305,8 @@ func (c *client) StreamStep(ctx context.Context, ctn *pipeline.Container) error
return
// channel is not closed
default:
// get the current size of log data
size := len(_log.GetData())

// update the existing log with the new bytes if there is new data to add
if len(logs.Bytes()) > size {
if len(logs.Bytes()) > 0 {
logger.Trace(logs.String())

// update the existing log with the new bytes
Expand Down

0 comments on commit 5679bf2

Please sign in to comment.