diff --git a/protocol/dubbo/readwriter.go b/protocol/dubbo/readwriter.go index e43619ebd602e3ab96e0448b9c5f5a3a195d159e..eb5cbe786a0e00d19902a725dbf1b19cc236817f 100644 --- a/protocol/dubbo/readwriter.go +++ b/protocol/dubbo/readwriter.go @@ -141,10 +141,10 @@ func (p *RpcServerPackageHandler) Read(ss getty.Session, data []byte) (interface attachments = req[6].(map[string]string) } pkg.Service.Interface = attachments[constant.INTERFACE_KEY] - if pkg.Service.Path == "" && attachments[constant.PATH_KEY] != "" { + if len(pkg.Service.Path) == 0 && len(attachments[constant.PATH_KEY]) != 0 { pkg.Service.Path = attachments[constant.PATH_KEY] } - if attachments[constant.GROUP_KEY] != "" { + if len(attachments[constant.GROUP_KEY]) != 0 { pkg.Service.Group = attachments[constant.GROUP_KEY] } pkg.Body = map[string]interface{}{ diff --git a/registry/protocol/protocol.go b/registry/protocol/protocol.go index 1f9d81a3aa63daa167fd316ecc39ba8a38615155..d01c92ec5ccf273de1ad60d3dd0b5804178b11c2 100644 --- a/registry/protocol/protocol.go +++ b/registry/protocol/protocol.go @@ -18,7 +18,6 @@ package protocol import ( - "github.com/apache/dubbo-go/common/proxy/proxy_factory" "sync" ) @@ -27,6 +26,7 @@ import ( "github.com/apache/dubbo-go/common/constant" "github.com/apache/dubbo-go/common/extension" "github.com/apache/dubbo-go/common/logger" + "github.com/apache/dubbo-go/common/proxy/proxy_factory" "github.com/apache/dubbo-go/protocol" "github.com/apache/dubbo-go/protocol/protocolwrapper" "github.com/apache/dubbo-go/registry"