diff --git a/protocol/dubbo/readwriter.go b/protocol/dubbo/readwriter.go index 8c6c8a5a53af4df9a89eae5db5752eb07f3aa446..137f3d48472b40195a1d8ed2ecb4aaddb2ec3ccc 100644 --- a/protocol/dubbo/readwriter.go +++ b/protocol/dubbo/readwriter.go @@ -140,10 +140,14 @@ func (p *RpcServerPackageHandler) Read(ss getty.Session, data []byte) (interface if req[6] != nil { attachments = req[6].(map[interface{}]interface{}) } - pkg.Service.Interface = attachments[constant.INTERFACE_KEY].(string) if pkg.Service.Path == "" && attachments[constant.PATH_KEY] != nil { pkg.Service.Path = attachments[constant.PATH_KEY].(string) } + if _, ok := attachments[constant.INTERFACE_KEY]; ok { + pkg.Service.Interface = attachments[constant.INTERFACE_KEY].(string) + } else { + pkg.Service.Interface = pkg.Service.Path + } if attachments[constant.GROUP_KEY] != nil { pkg.Service.Group = attachments[constant.GROUP_KEY].(string) }