From 6684789c7e1dba8b46c9355197672efbcb944afa Mon Sep 17 00:00:00 2001 From: Drew Bailey <2614075+drewbailey@users.noreply.github.com> Date: Fri, 12 Jun 2020 08:40:35 -0400 Subject: [PATCH] clean up --- client/logmon/logmon.go | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/client/logmon/logmon.go b/client/logmon/logmon.go index 436be4e1182b..dfc31e2b4c46 100644 --- a/client/logmon/logmon.go +++ b/client/logmon/logmon.go @@ -110,17 +110,9 @@ type TaskLogger struct { // IsRunning will return true as long as one rotator wrapper is still running func (tl *TaskLogger) IsRunning() bool { - var lroRunning bool - var lreRunning bool + lroRunning := tl.lro != nil && tl.lro.isRunning() + lreRunning := tl.lre != nil && tl.lre.isRunning() - if tl.lro != nil && tl.lro.isRunning() { - lroRunning = true - } - if tl.lre != nil && tl.lre.isRunning() { - lreRunning = true - } - - // If either lro or lre has stopped report false return lroRunning && lreRunning } @@ -181,7 +173,6 @@ func NewTaskLogger(cfg *LogConfig, logger hclog.Logger) (*TaskLogger, error) { // log rotator data. The processOutWriter should be attached to the process and // data will be copied from the reader to the rotator. type logRotatorWrapper struct { - copying bool fifoPath string rotatorWriter io.WriteCloser hasFinishedCopied chan struct{}