summaryrefslogtreecommitdiff
path: root/libpod/container_log.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-06-17 14:40:05 -0400
committerGitHub <noreply@github.com>2020-06-17 14:40:05 -0400
commit5694104c24f36d8575853a48e8ba3cdbf87b8f5c (patch)
tree3f48ca90ac504d2c8ea6daf33faf194eb9cd1eb8 /libpod/container_log.go
parentd97b5b04aa9f3387ed949855c1b866713bb42b1a (diff)
parent03e99c9b40d3ad4ba33fb63d2a3de781527ce345 (diff)
downloadpodman-5694104c24f36d8575853a48e8ba3cdbf87b8f5c.tar.gz
podman-5694104c24f36d8575853a48e8ba3cdbf87b8f5c.tar.bz2
podman-5694104c24f36d8575853a48e8ba3cdbf87b8f5c.zip
Merge pull request #6644 from jgallucci32/revert-log-follow
Revert #6591 to fix issue with failed tests
Diffstat (limited to 'libpod/container_log.go')
-rw-r--r--libpod/container_log.go23
1 files changed, 0 insertions, 23 deletions
diff --git a/libpod/container_log.go b/libpod/container_log.go
index 39c395fe6..c3a84d048 100644
--- a/libpod/container_log.go
+++ b/libpod/container_log.go
@@ -2,7 +2,6 @@ package libpod
import (
"os"
- "time"
"github.com/containers/libpod/libpod/define"
"github.com/containers/libpod/libpod/logs"
@@ -73,27 +72,5 @@ func (c *Container) readFromLogFile(options *logs.LogOptions, logChannel chan *l
}
options.WaitGroup.Done()
}()
- // Check if container is still running or paused
- go func() {
- if options.Follow {
- for {
- state, err := c.State()
- if err != nil && errors.Cause(err) != define.ErrNoSuchCtr {
- logrus.Error(err)
- break
- } else if err != nil {
- break
- }
- if state != define.ContainerStateRunning && state != define.ContainerStatePaused {
- err := t.Stop()
- if err != nil {
- logrus.Error(err)
- }
- break
- }
- time.Sleep(1 * time.Second)
- }
- }
- }()
return nil
}