mlog: fix bug which caused the DefaultHandler to not ever call Flush

This commit is contained in:
Brian Picciano 2019-01-12 20:10:45 -05:00
parent ee77656f39
commit 0ef6997f40

View File

@ -240,7 +240,7 @@ func DefaultHandler() Handler {
defer l.Unlock() defer l.Unlock()
err := DefaultFormat(bw, msg) err := DefaultFormat(bw, msg)
if err != nil { if err == nil {
err = bw.Flush() err = bw.Flush()
} }
return err return err