-
Type:
Task
-
Resolution: Fixed
-
Priority:
Unknown
-
Affects Version/s: None
-
Component/s: None
-
5
-
Not Needed
-
None
-
Not Needed
-
None
-
None
-
None
-
None
-
None
-
None
Use Case
As a... node driver user
I want... ongoing operations aborted on client.close()
So that... pending resources are cleaned up
Acceptance Criteria
Note: the AC of this ticket is no longer accurate. We changed the scope of this work to simply interrupt in-use connections on client close.
- Add an AbortController on the client
- When the signal aborts, any ongoing operations on the client should reject
- For each ongoing socket operation, timer, and file read, pass in abort controller that interrupts the promise completion and make the promise reject
- For file accesses. use the abortable helper so that the wrapped promise rejects
- Call the abort signal on client close
- Ensure all calls to socket.destroy() finish before returning client.close()
Testing Criteria
- Unit test that upon signal abort:
- Socket, timer, and file read promises are interrupted and reject
- File access promises complete then reject
There are no Sub-Tasks for this issue.