HomeClusterLabs Projects

[rx] Don't return 512 EOF messages from _recvmmsg

Description

[rx] Don't return 512 EOF messages from _recvmmsg

If recvmsg() returns 0 for EOF then it's going to do so
until the error is rectified or read with getsockopt(). But
the _recvmmsg() wrapper keeps reading until the vector is full
thus returning a block of 512 EOF messages all of which the caller
has to plough through.

This patch causes _recvmmsg() to return as soon as it has got
the first EOF so the the caller can deal with it in good time
and not spin looking at the same thing over and over again.

I've also fixed a couple of typos in related comments

Details

Provenance
chrissie-cAuthored on Jan 16 2020, 4:18 AM
fabbioneCommitted on Jan 31 2020, 3:53 AM
Parents
rK0fe2fa007c09: [rx] send reply packets only when transport is connected
Branches
Unknown
Tags
Unknown

Event Timeline