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

refactor(dht): introduce a single DHT server state #461

Merged
merged 1 commit into from
Aug 15, 2022
Merged

Conversation

kurnevsky
Copy link
Member

This should fix a deadlock we currently have on master. Later we can
move more stuff in this state and make it pure version of DHT server.

@coveralls
Copy link

coveralls commented Nov 13, 2021

Pull Request Test Coverage Report for Build 1480134706

  • 173 of 173 (100.0%) changed or added relevant lines in 3 files are covered.
  • 4 unchanged lines in 2 files lost coverage.
  • Overall coverage decreased (-0.004%) to 96.012%

Files with Coverage Reduction New Missed Lines %
tox_core/src/relay/client/client.rs 1 98.04%
tox_core/src/dht/server/mod.rs 3 96.7%
Totals Coverage Status
Change from base Build 1455930757: -0.004%
Covered Lines: 15699
Relevant Lines: 16351

💛 - Coveralls

@@ -233,12 +251,22 @@ impl Server {

/// Check if we have at least one node in good state.
pub async fn is_connected(&self) -> bool {
self.close_nodes.read()
self.state.read()
Copy link
Member

Choose a reason for hiding this comment

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

let state = self.state.read().await;

Copy link
Member

@kpp kpp left a comment

Choose a reason for hiding this comment

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

LGTM

This should fix a deadlock we currently have on master. Later we can
move more stuff in this state and make it pure version of DHT server.
@kurnevsky kurnevsky merged commit 44858ce into master Aug 15, 2022
@kurnevsky kurnevsky deleted the dht_state branch August 15, 2022 20:54
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