don't drop packets

This commit is contained in:
JackDoan
2026-01-30 13:48:43 -06:00
parent c9d72fd87c
commit 0fb3fb798f

View File

@@ -184,11 +184,14 @@ func (u *StdConn) ReadMulti(msgs []rawMessage) (int, error) {
0, 0,
0, 0,
) )
if err == unix.EAGAIN || err == unix.EINTR {
if err != 0 { if n == 0 {
if err == unix.EAGAIN || err == unix.EINTR {
continue continue
} else {
//ran out of time, but have some messages to return
return int(n), nil
} }
} else if err != 0 {
return 0, &net.OpError{Op: "recvmmsg", Err: err} return 0, &net.OpError{Op: "recvmmsg", Err: err}
} }