From f86bb561efea8b639a2711ea4798d071b2180e29 Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Mon, 20 May 2019 19:40:59 +0200 Subject: container: move channel close to its writer let the writer of the channel close it. Signed-off-by: Giuseppe Scrivano --- libpod/container_api.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libpod') diff --git a/libpod/container_api.go b/libpod/container_api.go index 06a31da11..eff5bfe5f 100644 --- a/libpod/container_api.go +++ b/libpod/container_api.go @@ -289,8 +289,8 @@ func (c *Container) Exec(tty, privileged bool, env, cmd []string, user, workDir chWait := make(chan error) go func() { chWait <- execCmd.Wait() + close(chWait) }() - defer close(chWait) pidFile := c.execPidPath(sessionID) // 60 second seems a reasonable time to wait -- cgit v1.2.3-54-g00ecf