Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

Commit

Permalink
conn: attach context to pd client (#287)
Browse files Browse the repository at this point in the history
Signed-off-by: Neil Shen <[email protected]>
  • Loading branch information
overvenus authored May 26, 2020
1 parent 0b47b8f commit bc21c31
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/conn/conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,8 @@ func NewMgr(
grpc.WithDefaultCallOptions(grpc.MaxCallRecvMsgSize(maxMsgSize)),
grpc.WithDefaultCallOptions(grpc.MaxCallSendMsgSize(maxMsgSize)),
}
pdClient, err := pd.NewClient(
addrs, securityOption, pd.WithGRPCDialOptions(maxCallMsgSize...))
pdClient, err := pd.NewClientWithContext(
ctx, addrs, securityOption, pd.WithGRPCDialOptions(maxCallMsgSize...))
if err != nil {
log.Error("fail to create pd client", zap.Error(err))
return nil, err
Expand Down

0 comments on commit bc21c31

Please sign in to comment.