diff options
author | Wolfy-J <[email protected]> | 2018-07-08 20:38:01 -0700 |
---|---|---|
committer | Wolfy-J <[email protected]> | 2018-07-08 20:38:01 -0700 |
commit | dafe0c3f4877c25157b5df4ca69eb23df248ab7a (patch) | |
tree | c3796aea78bb489cb06fa5da846196a178fe5df9 /error_buffer.go | |
parent | 9f59155c781f0178e52c53abd2b437d40c51a52d (diff) |
better error buffer
Diffstat (limited to 'error_buffer.go')
-rw-r--r-- | error_buffer.go | 3 |
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() |