Skip to content

Commit

Permalink
prevent dial backoffs in monitoring mode
Browse files Browse the repository at this point in the history
  • Loading branch information
dennis-tra committed Jan 11, 2024
1 parent cea10fe commit 2eb99f5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmd/nebula/cmd_monitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,10 @@ func MonitorAction(c *cli.Context) error {
// Allow transient connections. This way we can crawl a peer even if it is relayed.
ctx = network.WithUseTransient(ctx, "reach peers behind NATs")

// This is a custom configuration option that only exists in our fork of go-libp2p.
// see: https://github.com/plprobelab/go-libp2p/commit/f6d73ce3093ded293f0de032d239709069fac586
ctx = network.WithDisableBackoff(ctx, "prevent backoff")

_, err = eng.Run(ctx)
if err != nil && !errors.Is(err, context.Canceled) {
return fmt.Errorf("running crawl engine: %w", err)
Expand Down

0 comments on commit 2eb99f5

Please sign in to comment.