Snow-kal commented on code in PR #3231:
URL: https://github.com/apache/dubbo-go/pull/3231#discussion_r2901473579


##########
protocol/grpc/server.go:
##########
@@ -243,6 +198,14 @@ func registerService(providerServices 
map[string]*global.ServiceConfig, server *
                if invoker == nil {
                        panic(fmt.Sprintf("no invoker found for servicekey: 
%v", serviceKey))
                }
+               service, ok := 
invoker.GetURL().GetAttribute(constant.RpcServiceKey)
+               if !ok {
+                       panic(fmt.Sprintf("no rpc service found in url 
attribute %s for servicekey: %v", constant.RpcServiceKey, serviceKey))
+               }
+               ds, ok := service.(DubboGrpcService)
+               if !ok {
+                       panic("illegal service type registered")
+               }
 
                ds.SetProxyImpl(invoker)
                server.RegisterService(ds.ServiceDesc(), service)

Review Comment:
   感谢建议 已更改
   ![Uploading image.png…]()
   



-- 
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