Skip to content

Commit

Permalink
Move buffer down.
Browse files Browse the repository at this point in the history
  • Loading branch information
sbruens committed Sep 18, 2024
1 parent e1983df commit 0354b47
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion service/listeners.go
Original file line number Diff line number Diff line change
Expand Up @@ -281,10 +281,10 @@ func (m *multiPacketListener) Acquire() (net.PacketConn, error) {
buffer := make([]byte, serverUDPBufferSize)
for {
n, addr, err := m.pc.ReadFrom(buffer)
buffer = buffer[:n]
if errors.Is(err, net.ErrClosed) {
return
}
buffer = buffer[:n]
select {
case req := <-m.readCh:
n := copy(req.buffer, buffer)
Expand Down

0 comments on commit 0354b47

Please sign in to comment.