-
Type:
Sub-task
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
Use Case
As a... Node.js driver user
I want... MongoClient close to return only when all related resources are closed
So that... Node.js exits gracefully after MongoClient close
User Experience
- After MongoClient.close() returns all sockets are closed even ones that were waiting on a response
Dependencies
- None
Risks/Unknowns
- What could go wrong while implementing this change? (e.g., performance, inadvertent behavioral changes in adjacent functionality, existing tech debt, etc)
- Is there an opportunity for better cross-driver alignment or testing in this area?
- Is there an opportunity to improve existing documentation on this subject?
Acceptance Criteria
Implementation Requirements
- Close checked-out connections in MongoClient close
Testing Requirements
- Assert outstanding operations reject the corresponding error the connection was closed with
Documentation Requirements
- Update client.close docs
Follow Up Requirements
- Assert all sockets, timers, etc. are cleaned up after client.close()