mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Backport initialization of epMu in NewCtxClient to release-3.4
References: - etcd-io#17001 - etcd-io#17018 Signed-off-by: Chun-Hung Tseng <henrybear327@gmail.com>
This commit is contained in:
parent
f7cb2f4578
commit
8efb620c96
@ -89,7 +89,7 @@ func New(cfg Config) (*Client, error) {
|
|||||||
// service interface implementations and do not need connection management.
|
// service interface implementations and do not need connection management.
|
||||||
func NewCtxClient(ctx context.Context) *Client {
|
func NewCtxClient(ctx context.Context) *Client {
|
||||||
cctx, cancel := context.WithCancel(ctx)
|
cctx, cancel := context.WithCancel(ctx)
|
||||||
return &Client{ctx: cctx, cancel: cancel, lgMu: new(sync.RWMutex), lg: zap.NewNop()}
|
return &Client{ctx: cctx, cancel: cancel, lgMu: new(sync.RWMutex), epMu: new(sync.RWMutex), lg: zap.NewNop()}
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewFromURL creates a new etcdv3 client from a URL.
|
// NewFromURL creates a new etcdv3 client from a URL.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user