mirror of
https://github.com/gusaul/grpcox.git
synced 2024-12-24 09:20:41 +00:00
Merge pull request #42 from AlessandroLimTkp/fix-concurrent-metadata-issue
fix: stop resource headers from bleeding into invoke
This commit is contained in:
commit
6feae4127c
|
@ -83,6 +83,7 @@ func (g *GrpCox) GetResource(ctx context.Context, target string, plainText, isRe
|
|||
return nil, err
|
||||
}
|
||||
|
||||
// what is r.Headers used for?
|
||||
r.headers = h
|
||||
|
||||
g.activeConn.addConnection(target, r, g.maxLifeConn)
|
||||
|
|
|
@ -210,7 +210,7 @@ func (r *Resource) Invoke(ctx context.Context, metadata []string, symbol string,
|
|||
}
|
||||
h := grpcurl.NewDefaultEventHandler(&resultBuffer, r.descSource, formatter, false)
|
||||
|
||||
var headers = r.headers
|
||||
var headers []string
|
||||
if len(metadata) != 0 {
|
||||
headers = metadata
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user