-
Type: New Feature
-
Resolution: Fixed
-
Priority: Unknown
-
Affects Version/s: None
-
Component/s: None
-
None
-
Fully Compatible
-
Not Needed
-
Currently calling FindOne returns a SingleResult that uses a context.TODO (the same behavior as a context.Background) to fetch results from the underlying cursor (if they weren't returned with the initial batch). That could create a scenario where iterating the underlying cursor hangs indefinitely, violating the user's expectation that the Context passed to FindOne should limit all blocking calls related to the FindOne operation.
Definition of done:
- Pass the Context used in FindOne (and all other functions that return a SingleResult) to the SingleResult and use it when fetching the document from the cursor if it hasn't already been returned.