close inputReader on error instead of using Fatal()

This commit is contained in:
Patrick Hemmer 2015-01-20 10:11:57 -05:00
parent 299ee95277
commit ed888975b3
1 changed files with 2 additions and 1 deletions

View File

@ -21,8 +21,9 @@ func (logger *Logger) inputWriterScanner(inputReader *io.PipeReader) {
logger.Print(scanner.Text()) logger.Print(scanner.Text())
} }
if err := scanner.Err(); err != nil { 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) { func inputWriterFinalizer(inputWriter *io.PipeWriter) {