From e2f90e6fb362b977dca3f96ae305e6494dad4f0e Mon Sep 17 00:00:00 2001 From: xingshan Date: Sat, 8 Jan 2022 16:57:51 +0800 Subject: [PATCH] feat: fix bug --- go-plugin/pkg/protocol/dubbo/decoder.go | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/go-plugin/pkg/protocol/dubbo/decoder.go b/go-plugin/pkg/protocol/dubbo/decoder.go index 12cd5cd..8a7ad54 100644 --- a/go-plugin/pkg/protocol/dubbo/decoder.go +++ b/go-plugin/pkg/protocol/dubbo/decoder.go @@ -110,20 +110,12 @@ func decodeFrame(ctx context.Context, data api.IoBuffer) (cmd interface{}, err e func getServiceAwareMeta(ctx context.Context, frame *Frame) (map[string]string, error) { meta := make(map[string]string, 8) switch frame.SerializationId { - //dubbo encode by Hessian case 2: - m, err2 := decodeHessian(ctx, frame, meta) - if err2 != nil { - return m, err2 - } - meta = m - // dubbo decode by fastson + //dubbo encode by Hessian + return decodeHessian(ctx, frame, meta) case 6: - m, err2 := decodeFastjosn(ctx, frame, meta) - if err2 != nil { - return m, err2 - } - meta = m + // dubbo decode by fastson + return decodeFastjosn(ctx, frame, meta) default: return meta, nil } @@ -131,7 +123,6 @@ func getServiceAwareMeta(ctx context.Context, frame *Frame) (map[string]string, } func decodeHessian(ctx context.Context, frame *Frame, meta map[string]string) (map[string]string, error) { - meta = make(map[string]string, 8) if frame.SerializationId != 2 { // not hessian , do not support