`ProtoUDPListener` should not stop listening if it times out
Description of the task
ProtoUDPListener should not restart listening if it timesout. During Robocup this caused lots of "hiccups" with the robot, causing the robot to stop for short periods of time in the same intervals as defined in the code (possibly due to primitive timeouts?). We noticed that reverting the changes to this file introduced in #2906 fixes the issue.
https://github.com/UBC-Thunderbots/Software/blob/aaea6b7a9f09ea4c7706b5543de89c6aa8872456/src/software/networking/proto_udp_listener.hpp#L191-L205
It's worth noting that this change was initially added to field test fixture tests can close and cleanup properly with all threads stopping (@PhilD71 can talk more about this). So an alternative solution might be needed. In the meantime, we can probably remove this change.
Acceptance criteria
- [ ] Revert changes the introduced this issue
- [ ] Verify that it the listeners still work
- [ ] See if field test fixture can end cleanly. If not, look into alternative solutions
Blocked By
what might be happening here is that the callback is done before we start waiting for the condition variable lock timeout. So we accidentally miss the cv and wait another second.
Should be easy enough to fix, we just need to add a callback_done boolean before we wait for the condition variable like here: stackoverflow.com/a/43898389/22708148