From 077e38478b620b1fe0fe3f43cba6dfe0473e6fa6 Mon Sep 17 00:00:00 2001 From: Yilun Date: Sat, 13 Apr 2024 17:22:19 -0700 Subject: [PATCH] fix crash when entry config does not have ipfilter Signed-off-by: Yilun --- tuna.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tuna.go b/tuna.go index fd178a1..4646c27 100644 --- a/tuna.go +++ b/tuna.go @@ -844,7 +844,7 @@ func (c *Common) GetTopPerformanceNodes(measureBandwidth bool, n int) (types.Nod } func (c *Common) GetTopPerformanceNodesContext(ctx context.Context, measureBandwidth bool, n int) (types.Nodes, error) { - if len(c.ServiceInfo.IPFilter.GetProviders()) > 0 { + if c.ServiceInfo.IPFilter != nil && len(c.ServiceInfo.IPFilter.GetProviders()) > 0 { c.ServiceInfo.IPFilter.UpdateDataFileContext(ctx) }