paritytech / substrate-telemetry

Polkadot Telemetry service
GNU General Public License v3.0
299 stars 208 forks source link

fix(shard): Ignore duplicate node adds with same message ID #514

Closed Xanewok closed 1 year ago

Xanewok commented 1 year ago

Closes #508

Verified locally by running local telemetry shard + core combo and by running

$ substrate --dev --telemetry-url='ws://127.0.0.1:8001/submit/ 1' --telemetry-url='ws://127.0.0.1:8001/submit/ 1'

Previously, two nodes would be added: one that was stuck at #0 and the other one that was being updated; killing the node did not flush the stuck one. After this patch, only a single node is added and is then removed correctly on disconnect.

cc @jsdw @DamianStraszak