Mirror: A Node.js fetch shim using built-in Request, Response, and Headers (but without native fetch)

fix: Unref socket on response (#14)

authored by kitten.sh and committed by GitHub 4e8c13a7 10a3c02a

+6
+5
.changeset/slimy-seas-type.md
··· 1 + --- 2 + 'fetch-nodeshim': patch 3 + --- 4 + 5 + Unref the incoming socket when the timeout is disabled, to prevent body streams that never start from keeping processes alive
+1
src/fetch.ts
··· 149 149 150 150 outgoing.on('response', incoming => { 151 151 incoming.setTimeout(0); // Forcefully disable timeout 152 + incoming.socket.unref(); 152 153 153 154 const init = { 154 155 status: incoming.statusCode,