Andreas Eversberg wrote:
When reading from RTP socket, the first read() may fail right after connecting to remote socket. Subsequent read() will work as it should.
I have not discovered why this read fails, but I don't see any reason why we should stop reading, just because one read() fails at the beginning.
What is errno set to when this failure happens?
How to handle read() failures should probably depend on exactly what the failure is, ie. might need testing errno for known benign values and letting anything else cause a more severe error which bubbles up the stack.
//Peter