Skip to content

Commit

Permalink
added max buffer size
Browse files Browse the repository at this point in the history
  • Loading branch information
adubovikov committed Aug 31, 2023
1 parent 204a5e0 commit ed29af0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion HFP.go
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ func copyHEPbufftoFile(inbytes []byte, file string) (int64, error) {
log.Println("||-->", logsymbols.Error, "couldn't retrive stats from buffer file error", err)
return 0, err
} else {
if MaxBufferSizeBytes >= fi.Size() {
if fi.Size() >= MaxBufferSizeBytes {
log.Println("||-->", logsymbols.Error, "Buffer size has been excited error: Maxsize: ", MaxBufferSizeBytes, " vs CurrentSize: ", fi.Size())
return 0, fmt.Errorf("buffer size has been excited: %d", fi.Size())
}
Expand Down

0 comments on commit ed29af0

Please sign in to comment.