From 2c38f172d9cb0c9c319ad17a5e030d68426397c4 Mon Sep 17 00:00:00 2001 From: XinYang Date: Thu, 3 Jun 2021 15:36:58 +0800 Subject: [PATCH] Finish() no longer used binding-message in Send() Signed-off-by: XinYang --- v2/protocol/http/protocol.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/v2/protocol/http/protocol.go b/v2/protocol/http/protocol.go index 980cabf74..a17028795 100644 --- a/v2/protocol/http/protocol.go +++ b/v2/protocol/http/protocol.go @@ -141,6 +141,9 @@ func (p *Protocol) Send(ctx context.Context, m binding.Message, transformers ... } msg, err := p.Request(ctx, m, transformers...) + if msg != nil { + defer func() { _ = msg.Finish(err) }() + } if err != nil && !protocol.IsACK(err) { var res *Result if protocol.ResultAs(err, &res) {