[#XX] rpc: Use connect

Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
This commit is contained in:
Airat Arifullin 2024-12-05 13:06:53 +03:00
parent 0352b5b191
commit 96c7c2f740
2 changed files with 3 additions and 0 deletions

View file

@ -10,6 +10,7 @@ import (
type Conn interface {
grpc.ClientConnInterface
io.Closer
Connect()
}
// Conn returns underlying connection.

View file

@ -50,6 +50,8 @@ func (c *Client) Init(info common.CallMethodInfo, opts ...CallOption) (MessageRe
return nil, err
}
c.conn.Connect()
ctx, cancel := context.WithCancel(prm.ctx)
stream, err := c.conn.NewStream(ctx, &grpc.StreamDesc{
StreamName: info.Name,