Skip to content

Commit

Permalink
fix crash when entry config does not have ipfilter
Browse files Browse the repository at this point in the history
Signed-off-by: Yilun <[email protected]>
  • Loading branch information
yilunzhang committed Apr 14, 2024
1 parent e800a74 commit 1ee06dd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tuna.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down

0 comments on commit 1ee06dd

Please sign in to comment.