Merge writeOpts and tlsAuthOpts after call to ApplyURI (#9519)

This commit is contained in:
cyrus-mc 2020-07-22 09:09:02 -07:00 committed by GitHub
parent 4b81ede3e3
commit 9546f18ebc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -132,8 +132,7 @@ func createClient(ctx context.Context, connURL string, clientOptions *options.Cl
clientOptions.SetSocketTimeout(1 * time.Minute)
clientOptions.SetConnectTimeout(1 * time.Minute)
opts := clientOptions.ApplyURI(connURL)
client, err = mongo.Connect(ctx, opts)
client, err = mongo.Connect(ctx, options.MergeClientOptions(options.Client().ApplyURI(connURL), clientOptions))
if err != nil {
return nil, err
}