From 789a8f26161ca86a721fe6b7295e3eaf9051b3a2 Mon Sep 17 00:00:00 2001 From: AnandkumarPatel Date: Tue, 20 May 2014 17:20:26 -0700 Subject: [PATCH] use buffered channel so goroutine does not get blocked on done <- true when a timeout occurs. Docker-DCO-1.1-Signed-off-by: Anandkumar Patel (github: anandkumarpatel) --- daemon/container.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daemon/container.go b/daemon/container.go index 9ca94b2b56..a2dc5977a5 100644 --- a/daemon/container.go +++ b/daemon/container.go @@ -652,7 +652,7 @@ func (container *Container) Export() (archive.Archive, error) { } func (container *Container) WaitTimeout(timeout time.Duration) error { - done := make(chan bool) + done := make(chan bool, 1) go func() { container.Wait() done <- true