Return from goroutine when it should terminate

Signed-off-by: Craig Furman <cfurman@pivotal.io>
This commit is contained in:
Ed King 2018-01-23 10:46:31 +00:00 committed by Craig Furman
parent 8d3e6c9826
commit 5c0af14bf8
1 changed files with 1 additions and 0 deletions

View File

@ -323,6 +323,7 @@ func awaitFifoOpen(path string) <-chan openResult {
f, err := os.OpenFile(path, os.O_RDONLY, 0)
if err != nil {
fifoOpened <- openResult{err: newSystemErrorWithCause(err, "open exec fifo for reading")}
return
}
fifoOpened <- openResult{file: f}
}()