[GODRIVER-908] options.MergeClientOptions doesn't handle errors properly Created: 27/Mar/19  Updated: 28/Oct/23  Resolved: 01/Apr/19

Status: Closed
Project: Go Driver
Component/s: Options & Configuration
Affects Version/s: 1.0.0
Fix Version/s: 1.0.1

Type: Bug Priority: Major - P3
Reporter: Kristofer Brandow (Inactive) Assignee: Go Community User
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to GODRIVER-2056 SRV polling is not spawned because op... Closed

 Description   

When merging a set of options.ClientOptions we do not ensure that we copy the error from a given options.ClientOptions which means that errors from ApplyURI are suppressed.

To fix this, check if the err field of an options.ClientOptions instance is non-nil and if so, immediately return the options.ClientOptions with the error before merging.



 Comments   
Comment by Githook User [ 01/Apr/19 ]

Author:

{'name': 'Mathieu', 'email': 'mathieu@hedtechnologies.com'}

Message: GODRIVER-908 Fix err merging on options.ClientOptions
Branch: master
https://github.com/mongodb/mongo-go-driver/commit/0a9f60f89cbe0e188034a5b5cfbef5f66540f475

Generated at Thu Feb 08 08:35:13 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.