Commit Graph

1 Commits

Author SHA1 Message Date
Li Yuxuan
a3a30635ef namespace: Copy ttrpc metadata before setting header
If there are multiple goroutines calling `namespace.WithNamespace` on a
ctx that already had namespace, there will be a data race when
`withTTRPCNamespaceHeader` calling `MD.Set()`. So we have to copy the md
before using it.

Signed-off-by: Li Yuxuan <liyuxuan04@baidu.com>
2019-08-09 13:16:29 +08:00