Skip to content

Commit

Permalink
Merge branch 'release-5.0' into release-5.0-4db325d04803
Browse files Browse the repository at this point in the history
  • Loading branch information
AilinKid authored Apr 16, 2021
2 parents efa9d9c + 672d649 commit c93da0e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion server/conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -946,7 +946,10 @@ func (cc *clientConn) dispatch(ctx context.Context, data []byte) error {
}

span := opentracing.StartSpan("server.dispatch")
ctx = opentracing.ContextWithSpan(ctx, span)
cfg := config.GetGlobalConfig()
if cfg.OpenTracing.Enable {
ctx = opentracing.ContextWithSpan(ctx, span)
}

var cancelFunc context.CancelFunc
ctx, cancelFunc = context.WithCancel(ctx)
Expand Down

0 comments on commit c93da0e

Please sign in to comment.