From 0d926f48f215eedb3f36e991c267301da7906574 Mon Sep 17 00:00:00 2001 From: Wolfy-J Date: Sat, 23 Jun 2018 17:11:34 +0300 Subject: realtime error handling and displaying --- error_buffer.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'error_buffer.go') diff --git a/error_buffer.go b/error_buffer.go index 8c240e26..78effc9b 100644 --- a/error_buffer.go +++ b/error_buffer.go @@ -47,7 +47,9 @@ func (eb *errBuffer) Write(p []byte) (int, error) { eb.buf = append(eb.buf, p...) for msg := eb.fetchMsg(); msg != nil; msg = eb.fetchMsg() { - eb.lsn(EventStderrOutput, msg) + if eb.lsn != nil { + eb.lsn(EventStderrOutput, msg) + } } return len(p), nil -- cgit v1.2.3