From bf7d69c54001055ce99ea73067bdb223ca70ad75 Mon Sep 17 00:00:00 2001 From: Windfarer Date: Sun, 13 Oct 2019 10:00:57 +0800 Subject: [PATCH] fix trace --- pkg/cache/redis/trace.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pkg/cache/redis/trace.go b/pkg/cache/redis/trace.go index b782d309d..ed0b2a62d 100644 --- a/pkg/cache/redis/trace.go +++ b/pkg/cache/redis/trace.go @@ -122,9 +122,7 @@ func (t *traceConn) Receive() (reply interface{}, err error) { func (t *traceConn) WithContext(ctx context.Context) Conn { t.Conn = t.Conn.WithContext(ctx) - if root, ok := trace.FromContext(ctx); ok { - t.tr = root - } + t.tr, _ = trace.FromContext(ctx) return t }