Merge pull request #17018 from moficodes/patch-01

add initialization for epMu in contetx client
This commit is contained in:
Marek Siarkowicz 2023-11-25 20:16:38 +01:00 committed by GitHub
commit ce0a737ab1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -91,7 +91,7 @@ func New(cfg Config) (*Client, error) {
// service interface implementations and do not need connection management.
func NewCtxClient(ctx context.Context, opts ...Option) *Client {
cctx, cancel := context.WithCancel(ctx)
c := &Client{ctx: cctx, cancel: cancel, lgMu: new(sync.RWMutex)}
c := &Client{ctx: cctx, cancel: cancel, lgMu: new(sync.RWMutex), epMu: new(sync.RWMutex)}
for _, opt := range opts {
opt(c)
}