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 <anandkumarpatel@gmail.com> (github: anandkumarpatel)
This commit is contained in:
parent
83e9dc7200
commit
789a8f2616
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue