Browse Source

Fix crash on remote rule-set stop

世界 9 months ago
parent
commit
0908627297
1 changed files with 3 additions and 1 deletions
  1. 3 1
      route/rule/rule_set_remote.go

+ 3 - 1
route/rule/rule_set_remote.go

@@ -301,8 +301,10 @@ func (s *RemoteRuleSet) fetchOnce(ctx context.Context, startContext *adapter.HTT
 
 func (s *RemoteRuleSet) Close() error {
 	s.rules = nil
-	s.updateTicker.Stop()
 	s.cancel()
+	if s.updateTicker != nil {
+		s.updateTicker.Stop()
+	}
 	return nil
 }