tcp sendmsg() EAGAIN handling

we have a 'long lived' tcp connection w/ regular data sends (1hz of 256 bytes for mqtt publishes) where sendmsg() sometimes returns EAGAIN. when trying again it usually works but sometimes we get the poll() read event and this indicates that the peer reset the connection.

 i interpret this as there being an erro w/ the retry, an unexpected resend should be ok but only if it matches the previous send. are there conditions that the device-side where it could resend something different?

Related