From d7c929411be4db8c9c3c8c09db2e91392f949e77 Mon Sep 17 00:00:00 2001 From: Alex Sharov <AskAlexSharov@gmail.com> Date: Mon, 13 Sep 2021 13:39:48 +0700 Subject: [PATCH] fix sentry discover race (#2675) --- cmd/sentry/download/sentry.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/sentry/download/sentry.go b/cmd/sentry/download/sentry.go index b7ce39e0b5..7d80993e86 100644 --- a/cmd/sentry/download/sentry.go +++ b/cmd/sentry/download/sentry.go @@ -523,12 +523,12 @@ func Sentry(datadir string, sentryAddr string, discoveryDNS []string, cfg *p2p.C } ctx := rootContext() sentryServer := NewSentryServer(ctx, nil, func() *eth.NodeInfo { return nil }, cfg, protocolVersion) + sentryServer.discoveryDNS = discoveryDNS grpcServer, err := grpcSentryServer(ctx, sentryAddr, sentryServer) if err != nil { return err } - sentryServer.discoveryDNS = discoveryDNS <-ctx.Done() grpcServer.GracefulStop() -- GitLab