From 0b157258791dce8e32abd30614e2027af53eb2a9 Mon Sep 17 00:00:00 2001
From: flycash <flycash@apache.org>
Date: Fri, 31 Jan 2020 13:18:05 +0800
Subject: [PATCH] Fix review

---
 protocol/dubbo/listener.go | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/protocol/dubbo/listener.go b/protocol/dubbo/listener.go
index 69b45e4ab..430c4e49d 100644
--- a/protocol/dubbo/listener.go
+++ b/protocol/dubbo/listener.go
@@ -331,16 +331,15 @@ func (h *RpcServerHandler) OnCron(session getty.Session) {
 	}
 }
 
-// rebuild the context by attachment.
+// rebuildCtx rebuild the context by attachment.
 // Once we decided to transfer more context's key-value, we should change this.
 // now we only support rebuild the tracing context
 func rebuildCtx(inv *invocation.RPCInvocation) context.Context {
 	ctx := context.Background()
 
-	// actually, if user do not use any opentracing framework, it will always be error.
+	// actually, if user do not use any opentracing framework, the err will not be nil.
 	spanCtx, err := opentracing.GlobalTracer().Extract(opentracing.TextMap,
 		opentracing.TextMapCarrier(inv.Attachments()))
-
 	if err == nil {
 		ctx = context.WithValue(ctx, constant.TRACING_REMOTE_SPAN_CTX, spanCtx)
 	}
-- 
GitLab