Skip to content

Fix select() always timing out in rmc_serv

Summary

I believe I fixed the issue. Trying several things with select() but I couldn't get it to work. Based on the note in https://man7.org/linux/man-pages/man2/select.2.html saying "All modern applications should instead use poll(2) or epoll(7)", I decided to try an implementation with poll() seeing as the change is trivial. I am still not sure if the FD_SETSIZE limitation is the root cause of the issue, but poll() does seem to work correctly. It is also simpler and more intuitive to work with compared to select().

Anyway, I updated the logic to be a bit easier to follow. It should do the exact same thing, apart from:

Also fixed some of the very weird indentations in the file

Additional Required Actions

  • Requires manual tests in pre-production: NO
  • Requires a documentation update: NO

References

Closes #969 (closed)

Edited by Niels Alexander Buegel

Merge request reports

Loading