The probable source of the problems I described above was identified last night buy the astute observers on team 254.
In the original source code above has a "sleep(50);" within the run loop, the intent is for this to be a 50ms sleep, however the sleep routine in vxworks takes an integer parameter of seconds (rather than milliseconds); so upon reaching the end of the stream, or losing connection, a 50 second sleep is initiated.
To resolve this, the sleep can be changed to Wait(0.05);
This is fixed here:
https://github.com/FirstTeamExcel/Ro...sionServer.cpp
They also noted a few other issues that I have not yet fixed:
Data corruption due to multi-threaded access to the status/count values. To fix this, a lock needs to be employed around the count and status values when updating and reading.
HasClientConnection the logic here is incomplete (it should check against the timeout time defined above) and also fails to lock _lastHeartbeatTime