Compare commits
1 Commits
v3.11.12
...
6022b1719a
Author | SHA1 | Date | |
---|---|---|---|
6022b1719a |
3
grpc.go
3
grpc.go
@@ -803,6 +803,7 @@ func (g *grpcClient) publish(ctx context.Context, ps []client.Message, opts ...c
|
||||
|
||||
for _, p := range ps {
|
||||
md := metadata.Copy(omd)
|
||||
md[metadata.HeaderContentType] = p.ContentType()
|
||||
topic := p.Topic()
|
||||
if len(exchange) > 0 {
|
||||
topic = exchange
|
||||
@@ -814,8 +815,6 @@ func (g *grpcClient) publish(ctx context.Context, ps []client.Message, opts ...c
|
||||
md.Set(k, v)
|
||||
}
|
||||
|
||||
md[metadata.HeaderContentType] = p.ContentType()
|
||||
|
||||
// passed in raw data
|
||||
if d, ok := p.Payload().(*codec.Frame); ok {
|
||||
body = d.Data
|
||||
|
@@ -130,7 +130,7 @@ func (p *ConnPool) Get(ctx context.Context, addr string, opts ...grpc.DialOption
|
||||
}
|
||||
p.Unlock()
|
||||
|
||||
// nolint (TODO need fix) create new conn)
|
||||
// create new conn)
|
||||
cc, err := grpc.DialContext(ctx, addr, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
Reference in New Issue
Block a user