Skip to content

Commit

Permalink
fix: don't connect itself (#473)
Browse files Browse the repository at this point in the history
* fix: don't connect itself

* fix warns

* fix warns
  • Loading branch information
giangndm authored Nov 28, 2024
1 parent a746c88 commit b62ba32
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions bin/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,9 @@ async fn main() {
node.seeds = addrs;
}

// Remove self address for avoiding circular loop
node.seeds.retain(|addr| addr.node_id() != node.node_id);

let local = tokio::task::LocalSet::new();
local
.run_until(async move {
Expand Down

0 comments on commit b62ba32

Please sign in to comment.