From ed888975b3cc9170f10b256d99f1ec82f81e615b Mon Sep 17 00:00:00 2001 From: Patrick Hemmer <patrick.hemmer@gmail.com> Date: Tue, 20 Jan 2015 10:11:57 -0500 Subject: [PATCH] close inputReader on error instead of using Fatal() --- input_writer.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/input_writer.go b/input_writer.go index 8809915..e6db8e7 100644 --- a/input_writer.go +++ b/input_writer.go @@ -21,8 +21,9 @@ func (logger *Logger) inputWriterScanner(inputReader *io.PipeReader) { logger.Print(scanner.Text()) } if err := scanner.Err(); err != nil { - logger.Fatal(err) + logger.Errorf("Error while reading from InputWriter: %s", err) } + inputReader.Close() } func inputWriterFinalizer(inputWriter *io.PipeWriter) {