aboutsummaryrefslogtreecommitdiff
path: root/libpod
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2022-01-18 13:20:10 -0500
committerGitHub <noreply@github.com>2022-01-18 13:20:10 -0500
commit62212dbf490d736ad06523a92345a480e4972dab (patch)
tree5d9e778f05044018d8cdad7dca9c40a8aa7f2393 /libpod
parent094665ac0cccc04c7797881ff2a27ff330e9a72e (diff)
parent7e30531f20b8c367aad81454abda8505a0d9962a (diff)
downloadpodman-62212dbf490d736ad06523a92345a480e4972dab.tar.gz
podman-62212dbf490d736ad06523a92345a480e4972dab.tar.bz2
podman-62212dbf490d736ad06523a92345a480e4972dab.zip
Merge pull request #12909 from vrothberg/fix-12904
compat attach: fix write on closed channel
Diffstat (limited to 'libpod')
-rw-r--r--libpod/oci_conmon_linux.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/libpod/oci_conmon_linux.go b/libpod/oci_conmon_linux.go
index 3fa43aed9..268a301fb 100644
--- a/libpod/oci_conmon_linux.go
+++ b/libpod/oci_conmon_linux.go
@@ -660,13 +660,13 @@ func (r *ConmonOCIRuntime) HTTPAttach(ctr *Container, req *http.Request, w http.
}
errChan <- err
}()
+ if err := ctr.ReadLog(context.Background(), logOpts, logChan); err != nil {
+ return err
+ }
go func() {
logOpts.WaitGroup.Wait()
close(logChan)
}()
- if err := ctr.ReadLog(context.Background(), logOpts, logChan); err != nil {
- return err
- }
logrus.Debugf("Done reading logs for container %s, %d bytes", ctr.ID(), logSize)
if err := <-errChan; err != nil {
return err