summaryrefslogtreecommitdiff
path: root/error_buffer.go
diff options
context:
space:
mode:
Diffstat (limited to 'error_buffer.go')
-rw-r--r--error_buffer.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/error_buffer.go b/error_buffer.go
index 8be9c5a8..211fe25f 100644
--- a/error_buffer.go
+++ b/error_buffer.go
@@ -43,7 +43,9 @@ func newErrBuffer() *errBuffer {
if len(eb.buf) > eb.last {
if eb.lsn != nil {
eb.lsn(EventStderrOutput, eb.buf[eb.last:])
+ eb.buf = eb.buf[0:0]
}
+
eb.last = len(eb.buf)
}
eb.mu.Unlock()
@@ -55,6 +57,7 @@ func newErrBuffer() *errBuffer {
if eb.lsn != nil {
eb.lsn(EventStderrOutput, eb.buf[eb.last:])
}
+
eb.last = len(eb.buf)
}
eb.mu.Unlock()