From 5679bf2c201e4ae780dccb69ee942c6dbda35600 Mon Sep 17 00:00:00 2001 From: David Vader <48764154+davidvader@users.noreply.github.com> Date: Mon, 8 Nov 2021 08:59:52 -0500 Subject: [PATCH] fix: compare time chunks against zero (#235) --- executor/linux/service.go | 5 +---- executor/linux/step.go | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/executor/linux/service.go b/executor/linux/service.go index 63f039f1..c60843f5 100644 --- a/executor/linux/service.go +++ b/executor/linux/service.go @@ -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 diff --git a/executor/linux/step.go b/executor/linux/step.go index 2a29b264..9d68cf05 100644 --- a/executor/linux/step.go +++ b/executor/linux/step.go @@ -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