-
Type: Task
-
Resolution: Unresolved
-
Priority: Unknown
-
None
-
Affects Version/s: None
-
Component/s: 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
- 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Â