forked from TrueCloudLab/frostfs-sdk-go
[#XX] rpc: Use connect
Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
This commit is contained in:
parent
0352b5b191
commit
96c7c2f740
2 changed files with 3 additions and 0 deletions
|
@ -10,6 +10,7 @@ import (
|
|||
type Conn interface {
|
||||
grpc.ClientConnInterface
|
||||
io.Closer
|
||||
Connect()
|
||||
}
|
||||
|
||||
// Conn returns underlying connection.
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue