Skip to content

Commit 0f28d84

Browse files
committed
cleanup
1 parent 562c9d0 commit 0f28d84

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

agent/server/snykbroker/supervisor.go

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -271,12 +271,10 @@ func (b *Supervisor) scanLines(reader io.Reader, output chan string, refCount *s
271271
if err == nil {
272272
return
273273
}
274-
if err != nil {
275-
output <- fmt.Sprintf("Warning (non-fatal), failed to read from scanner to pipe output: %v", err)
276-
}
274+
output <- fmt.Sprintf("Warning (non-fatal), failed to read from scanner to pipe output: %v", err)
277275

278-
// dump what we have in the buffer, then continue
279-
output <- string(buffer) + "...[END OF BUFFER]"
276+
// dump what we have in the buffer, first 16K, then continue
277+
output <- string(buffer[0:16*1024]) + "...[END OF BUFFER]"
280278
}
281279

282280
}()

0 commit comments

Comments
 (0)