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

Inconsistent behavior when history_receiver.recv() returns None #141

Open
progval opened this issue Oct 26, 2024 · 0 comments
Open

Inconsistent behavior when history_receiver.recv() returns None #141

progval opened this issue Oct 26, 2024 · 0 comments

Comments

@progval
Copy link
Collaborator

progval commented Oct 26, 2024

ServicesServer ignores it:

update = history_receiver.recv() =>
{
if let Some(update) = update
{
if let NetworkStateChange::NewServer(new_server) = &update.change
{
if new_server.server == self.node.id()
{
self.burst_to_network().await;
}
}
}
}

but HistoryServer breaks the loop:

update = history_receiver.recv() =>
{
let Some(update) = update else { break; };
if let Err(error) = self.handle_history_update(update).await {
tracing::error!(?error, "Error return handling history update");
}
}

HistoryServer is probably the correct one here, it looks like ServicesServer would enter an infinite loop when the associated sender is dropped

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

No branches or pull requests

1 participant