Alanxtl commented on code in PR #3054:
URL: https://github.com/apache/dubbo-go/pull/3054#discussion_r2446564039
##########
registry/protocol/protocol.go:
##########
@@ -269,26 +292,48 @@ func registerServiceMap(invoker base.Invoker) error {
// such as
dubbo://:20000/org.apache.dubbo.UserProvider?bean.name=UserProvider&cluster=failfast...
id := providerUrl.GetParam(constant.BeanNameKey, "")
- serviceConfig := config.GetProviderConfig().Services[id]
- if serviceConfig == nil {
- s := "reExport can not get serviceConfig"
- return perrors.New(s)
- }
- rpcService := config.GetProviderService(id)
- if rpcService == nil {
- s := "reExport can not get RPCService"
- return perrors.New(s)
+ providerConfig := config.GetProviderConfig()
Review Comment:
```suggestion
//TODO: Temporary compatibility with old APIs, can be removed later
providerConfig := config.GetProviderConfig()
```
##########
registry/protocol/protocol.go:
##########
@@ -424,9 +469,24 @@ func (proto *registryProtocol) Destroy() {
// close all protocol server after consumerUpdateWait +
stepTimeout(max time wait during
// waitAndAcceptNewRequests procedure)
go func() {
- <-time.After(config.GetShutDown().GetStepTimeout() +
config.GetShutDown().GetConsumerUpdateWaitTime())
- exporter.UnExport()
- proto.bounds.Delete(key)
+ if configShutdown := config.GetShutDown();
configShutdown != nil {
+ <-time.After(configShutdown.GetStepTimeout() +
configShutdown.GetConsumerUpdateWaitTime())
+ exporter.UnExport()
+ proto.bounds.Delete(key)
+ return
+ }
+
+ if shutdownConfRaw, ok :=
exporter.registerUrl.GetAttribute(constant.ShutdownConfigPrefix); ok {
Review Comment:
need to make sure is ShutdownConfig already set into url or not
--
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]