fix high buffer usage reporting

This commit is contained in:
Johannes Kimmel 2023-08-23 21:24:57 +02:00
parent a9cfa381af
commit 199ff0f756
1 changed files with 2 additions and 2 deletions

View File

@ -64,7 +64,7 @@ func (vx *vx46) forward46() error {
for {
n, err := vx.pc4.ReadBatch(msgs4[:], 0)
if n > NUM_MSGS*4/3 {
if n > vx.buffers*3/4 {
log.Printf("forward46: %d in", n)
}
if err != nil {
@ -123,7 +123,7 @@ func (vx *vx46) forward64() error {
for {
n, err := vx.pc6.ReadBatch(msgs6[:], 0)
if n > NUM_MSGS*4/3 {
if n > vx.buffers*3/4 {
log.Printf("forward64: %d in", n)
}
if err != nil {