Skip to content

fixes TSL to report the same state for all devices #786

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

maklem
Copy link

@maklem maklem commented Feb 10, 2025

Summary

  • fixes TSL to report the same state for all devices

Related Issues

Changes

  • UpdateDeviceState derives currentDeviceTallyData from SourceClients instead of currentSourceTallyData

Background

In sourceClient.tally.subscribe(...) near src/index.ts:1353 tally data is prepared for a source.
For every entry, that matches a device_source the tally data is stored per sourceId dropping the address.
If multiple entries match (i.e. for the test source), the last match overwrites any previous matches.
(which leads to odd behavior as described in #765 and #778)

I do not understand the intention of currentSourceTallyData for sources referring to multiple addresses.
I found SourceClients is used in getDeviceStates() (near index.ts:1125) and concluded that SourceClients contains the needed information, and can be used.

Testing

  • ✅ manual testing with test source and tcpdump

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello there maklem 👋

Thank you for opening your first PR for the Tally Arbiter project!

We will review it soon!

TallyArbiter fosters an open and welcoming environment for all our contributors. Please adhere to our Code Of Conduct.

@maklem maklem force-pushed the TA-765_TSL-reporting-the-same-for-all-devices branch from 697eb7e to cefca02 Compare February 10, 2025 11:29
@maklem
Copy link
Author

maklem commented Feb 10, 2025

resolved conflicts (autoclrf messing with line endings)

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

Successfully merging this pull request may close these issues.

1 participant