feat(pkg/p2p): reconnect on disconnected peers#3212
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
The latest Buf updates on your PR. Results from workflow CI / buf-check (pull_request).
|
|
Claude finished @julienrbrt's task in 2m 18s —— View job Code Review: feat(pkg/p2p): reconnect on disconnected peers
OverviewThe PR adds two features to Overall the approach is solid and idiomatic for libp2p. A few correctness concerns and missing tests are worth addressing before merge. Issues1. Untracked reconnect goroutine — potential resource leak on close
go func(info peer.AddrInfo) {
if err := c.host.Connect(ctx, info); err != nil && ctx.Err() == nil {
c.logger.Warn().Str("peer", info.ID.String()).Err(err).Msg("failed to reconnect to seed peer")
}
}(sp)This goroutine is not tracked by 2.
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3212 +/- ##
==========================================
- Coverage 61.41% 61.21% -0.21%
==========================================
Files 120 120
Lines 12474 12561 +87
==========================================
+ Hits 7661 7689 +28
- Misses 3953 4010 +57
- Partials 860 862 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Attempt to reconnect on peers when having connectivity issue.
PR made by AI. Still testing.