eval: In "all", always wait for valuesDone before return.

This commit is contained in:
Qi Xiao 2017-11-22 01:05:43 +00:00
parent 4f09e19876
commit c84dbf4501

View File

@ -716,8 +716,8 @@ func all(ec *EvalCtx, args []Value, opts map[string]Value) {
close(valuesDone)
}()
_, err := io.Copy(ec.ports[1].File, ec.ports[0].File)
maybeThrow(err)
<-valuesDone
maybeThrow(err)
}
func take(ec *EvalCtx, args []Value, opts map[string]Value) {