Alanxtl commented on code in PR #3029:
URL: https://github.com/apache/dubbo-go/pull/3029#discussion_r2508722882
##########
cluster/router/affinity/router.go:
##########
@@ -85,13 +84,7 @@ type ApplicationAffinityRoute struct {
func newApplicationAffinityRouter(url *common.URL) *ApplicationAffinityRoute {
- application, ok := url.GetAttribute(constant.ApplicationKey)
- if !ok {
- logger.Warnf("ApplicationAffinityRoute url does not have
application attribute, url=%s", url)
- return nil
- }
-
- applicationName := application.(global.ApplicationConfig).Name
+ applicationName := url.GetParam(constant.ApplicationKey, "")
Review Comment:
之前的逻辑里有为""的时候return,还是加一下这个检查的步骤吧
--
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]