Compare commits

..

1 Commits

Author SHA1 Message Date
6022b1719a add test
Some checks failed
lint / lint (pull_request) Failing after 1m14s
test / test (pull_request) Successful in 3m40s
2024-12-19 23:34:52 +03:00
2 changed files with 2 additions and 3 deletions

View File

@@ -803,6 +803,7 @@ func (g *grpcClient) publish(ctx context.Context, ps []client.Message, opts ...c
for _, p := range ps { for _, p := range ps {
md := metadata.Copy(omd) md := metadata.Copy(omd)
md[metadata.HeaderContentType] = p.ContentType()
topic := p.Topic() topic := p.Topic()
if len(exchange) > 0 { if len(exchange) > 0 {
topic = exchange topic = exchange
@@ -814,8 +815,6 @@ func (g *grpcClient) publish(ctx context.Context, ps []client.Message, opts ...c
md.Set(k, v) md.Set(k, v)
} }
md[metadata.HeaderContentType] = p.ContentType()
// passed in raw data // passed in raw data
if d, ok := p.Payload().(*codec.Frame); ok { if d, ok := p.Payload().(*codec.Frame); ok {
body = d.Data body = d.Data

View File

@@ -130,7 +130,7 @@ func (p *ConnPool) Get(ctx context.Context, addr string, opts ...grpc.DialOption
} }
p.Unlock() p.Unlock()
// nolint (TODO need fix) create new conn) // create new conn)
cc, err := grpc.DialContext(ctx, addr, opts...) cc, err := grpc.DialContext(ctx, addr, opts...)
if err != nil { if err != nil {
return nil, err return nil, err