From 2eb99f5046117e90a40b26f56b8d818b02993a50 Mon Sep 17 00:00:00 2001 From: Dennis Trautwein Date: Thu, 11 Jan 2024 13:48:33 +0100 Subject: [PATCH] prevent dial backoffs in monitoring mode --- cmd/nebula/cmd_monitor.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmd/nebula/cmd_monitor.go b/cmd/nebula/cmd_monitor.go index a21533f..1e8f0b9 100644 --- a/cmd/nebula/cmd_monitor.go +++ b/cmd/nebula/cmd_monitor.go @@ -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)