summaryrefslogtreecommitdiff
path: root/libpod/util.go
diff options
context:
space:
mode:
Diffstat (limited to 'libpod/util.go')
-rw-r--r--libpod/util.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/libpod/util.go b/libpod/util.go
index b60575264..164800af4 100644
--- a/libpod/util.go
+++ b/libpod/util.go
@@ -69,7 +69,11 @@ func WaitForFile(path string, chWait chan error, timeout time.Duration) (bool, e
defer watcher.Close()
}
- timeoutChan := time.After(timeout)
+ var timeoutChan <-chan time.Time
+
+ if timeout != 0 {
+ timeoutChan = time.After(timeout)
+ }
for {
select {