Merge pull request #1087 from rockXiaofeng/Ftr/nilAttachments
Bugfix: nil attachments
diff --git a/protocol/dubbo/impl/hessian.go b/protocol/dubbo/impl/hessian.go
index e355276..4aaf67b 100644
--- a/protocol/dubbo/impl/hessian.go
+++ b/protocol/dubbo/impl/hessian.go
@@ -254,6 +254,10 @@
return perrors.WithStack(err)
}
+ if attachments == nil {
+ attachments = map[interface{}]interface{}{constant.INTERFACE_KEY: target}
+ }
+
if v, ok := attachments.(map[interface{}]interface{}); ok {
v[DUBBO_VERSION_KEY] = dubboVersion
req[6] = ToMapStringInterface(v)