This commit is contained in:
JackDoan
2026-04-17 12:27:50 -05:00
parent bd0a63a545
commit 4a2134775d
3 changed files with 49 additions and 28 deletions

View File

@@ -355,6 +355,12 @@ func (f *Interface) listenIn(reader overlay.Queue, i int) {
}
func (f *Interface) flushBatch(batch *sendBatch, q int) {
if len(batch.bufs) == 1 {
if err := f.writers[q].WriteTo(batch.bufs[0], batch.dsts[0]); err != nil {
f.l.WithError(err).WithField("writer", q).Error("Failed to write outgoing single-batch")
}
return
}
if err := f.writers[q].WriteBatch(batch.bufs, batch.dsts); err != nil {
f.l.WithError(err).WithField("writer", q).Error("Failed to write outgoing batch")
}