Skip to content

Commit

Permalink
fix: return duplicated addr
Browse files Browse the repository at this point in the history
see the issue for details

fixes issue nervosnetwork#436
  • Loading branch information
rink1969 committed Apr 10, 2019
1 parent f5a17c1 commit 0e65c5b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions network/src/network.rs
Expand Up @@ -221,6 +221,7 @@ impl NetworkState {
let original_listened_addresses = self.original_listened_addresses.read();
self.listened_addresses(max_urls.saturating_sub(original_listened_addresses.len()))
.into_iter()
.filter(|(addr, _)| !original_listened_addresses.contains(addr))
.chain(
original_listened_addresses
.iter()
Expand Down

0 comments on commit 0e65c5b

Please sign in to comment.