Skip to content

Commit

Permalink
chore: rebuild connection via seed peer
Browse files Browse the repository at this point in the history
  • Loading branch information
limebell committed Dec 11, 2024
1 parent 842da15 commit e8bab4f
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion src/Libplanet.Net/Consensus/Gossip.cs
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,21 @@ private async Task RebuildTableAsync(CancellationToken ctx)
"{FName}: Updating peer table from seed(s) {Seeds}...",
nameof(RebuildTableAsync),
_seeds.Select(s => s.Address.ToHex()));
await _protocol.RebuildConnectionAsync(Kademlia.MaxDepth, ctx);
try
{
await _protocol.BootstrapAsync(
_seeds,
TimeSpan.FromSeconds(1),
Kademlia.MaxDepth,
ctx);
}
catch (Exception e)
{
_logger.Error(
e,
"Peer discovery exception occurred during {FName}.",
nameof(RebuildTableAsync));
}
}
}

Expand Down

0 comments on commit e8bab4f

Please sign in to comment.