FIx batched InputPackets

This commit is contained in:
世界 2026-07-06 23:38:46 +08:00
parent 57baac9504
commit 2c27bbf4f9
No known key found for this signature in database
GPG key ID: CD109927C34A63C4
2 changed files with 23 additions and 11 deletions

View file

@ -408,6 +408,13 @@ func (e ErrUDPGSODisabled) Unwrap() error {
}
func (s *StdNetBind) Send(bufs [][]byte, endpoint Endpoint, offset int) error {
for len(bufs) > IdealBatchSize {
err := s.Send(bufs[:IdealBatchSize], endpoint, offset)
if err != nil {
return err
}
bufs = bufs[IdealBatchSize:]
}
s.mu.Lock()
blackhole := s.blackhole4
conn := s.ipv4