Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

read_from_socket should always retry if it returns with errno=EAGAIN #408

Open
erlingrj opened this issue Apr 8, 2024 · 2 comments
Open

Comments

@erlingrj
Copy link
Collaborator

erlingrj commented Apr 8, 2024

Currently, it will only retry a certain number of times before deeming the socket connection for faulty. This will then close this socket, and in the case of the RTI, it will then deem a federate disconnected.

I have observed this happening with federates that don't produce any signals/messages for a long time. E.g. the ones that have only intermittent events due to a physical action.

I will address this issue soon in a PR, logging it here just-in-case.

@erlingrj
Copy link
Collaborator Author

Actually, bounding the number of retries was done in this PR #323, @edwardalee do you remember the reasoning?

What I have seen is that when there is that the call to read will return with EAGAIN after a while, so if there is periods with no data arriving from a federate it will just close the connection to it and drop any data destined for it.

@edwardalee
Copy link
Contributor

I agree that EAGAIN should always result in a retry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants