npm / minipass-fetch

An implementation of window.fetch in Node.js using Minipass streams
Other
54 stars 11 forks source link

feat: leverage request.setTimeout and the timeout event #24

Closed nlf closed 2 years ago

nlf commented 2 years ago

there is a race condition between the original timeout handling here and the socket's timeout event, which may fire if the user is passing in an agent that has a timeout set. by using request.setTimeout and adding a listener for the timeout event, we consolidate our timeout handling and remove this race condition.

References