From 94c40909cc3a925fa315e6f912bb6a750d304cb8 Mon Sep 17 00:00:00 2001 From: James Shubin Date: Wed, 27 Feb 2019 06:00:40 -0500 Subject: [PATCH] lang: funcs: Avoid erroneous empty message in readfile Readfile had a bug where it sent an empty string on startup. This has ben fixed, and it now waits until the file contents are ready before sending a string. --- lang/funcs/core/os/readfile_func.go | 1 + 1 file changed, 1 insertion(+) diff --git a/lang/funcs/core/os/readfile_func.go b/lang/funcs/core/os/readfile_func.go index 555064a1..a328f221 100644 --- a/lang/funcs/core/os/readfile_func.go +++ b/lang/funcs/core/os/readfile_func.go @@ -164,6 +164,7 @@ func (obj *ReadFileFunc) Stream() error { //err = nil // reset } }() + continue // wait for an actual event or we'd send empty! case err, ok := <-obj.events: if !ok {