Skip to content
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

fix(sidecar): ping messages were not sent #683

Merged
merged 4 commits into from
Jan 15, 2025

Conversation

thedevbirb
Copy link
Contributor

@thedevbirb thedevbirb commented Jan 15, 2025

This PR fixes the ping of the CommitmentRequestProcessor. In essence, pings were sent only if other events woke up the task because the receiver is not using the asynchronous context.
Moreover, a broadcast receiver doesn't track individual tasks or their wakers. As such, I've opted to completely remove the PingTicker and use an interval instead spawned per task, that once ticked sends ping messages.

@merklefruit
Copy link
Collaborator

Have you considered moving from sync::broadcast to sync::watch channels?
Perhaps useless for the ping one since it needs to send repeated messages but can be useful to fix the shutdown one.

@thedevbirb
Copy link
Contributor Author

thedevbirb commented Jan 15, 2025

Have you considered moving from sync::broadcast to sync::watch channels? Perhaps useless for the ping one since it needs to send repeated messages but can be useful to fix the shutdown one.

Added a workaround with 987410d. #673 would be a generalized solution.

Copy link
Collaborator

@merklefruit merklefruit left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@mempirate mempirate left a comment

Choose a reason for hiding this comment

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

Good stuff, the peculiarities of async rust init

@merklefruit merklefruit merged commit c0b9664 into unstable Jan 15, 2025
3 checks passed
@merklefruit merklefruit deleted the lore/fix/processor-pings branch January 15, 2025 18:07
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.

3 participants