bugfix/SK-850 | Sets client status to online in database when client connects #606
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
If a client disconnects and connects again before combiner registers it as offline, then controller updates status is db to "available", but combiner sees no change and client status is then stuck as "available" in database.
If a client and combiner goes down at a similar time, then the client is always listed as "online" if the combiner didn't have time to register the client disconnecting.
This PR fixes the first issue by setting the db status to online in TaskStream when the client reconnects. It partly addresses the second issue by cleaning up the status of previously connected clients when the combiner comes online again. Of course, if the combiner remains offline, then this issue is still there (could maybe be solved in the controller in that case)?