MaoMengww commented on code in PR #3682:
URL: https://github.com/apache/dubbo-go/pull/3682#discussion_r3810500335


##########
cluster/router/script/router.go:
##########
@@ -117,11 +123,11 @@ func (s *ScriptRouter) Process(event 
*config_center.ConfigChangeEvent) {
                        logger.Error("[Router][Script] applicationName field 
must be set in config")
                        return
                }
-               if !*cfg.Enabled {
+               if cfg.Enabled != nil && !*cfg.Enabled {
                        logger.Infof("[Router][Script] enabled field equals 
false, this rule will be ignored, script=%s", cfg.Script)
                }
                // rewrite to ScriptRouter
-               s.enabled = *cfg.Enabled
+               s.enabled = cfg.Enabled == nil || *cfg.Enabled

Review Comment:
   同上



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to