Closed szmarczak closed 3 years ago
https://github.com/nodejs/node/blob/8d2e66cae33472f5d4017444fd4116a4db5667d2/lib/internal/streams/destroy.js#L311
https://github.com/nodejs/node/blob/8d2e66cae33472f5d4017444fd4116a4db5667d2/lib/internal/streams/readable.js#L1158
request.abort() is called when using for await (cost chunk of response)
request.abort()
for await (cost chunk of response)
This is a Node.js bug but I doubt they will fix this so let's fix it here. It just makes the timings incorrect.
Fixed in b8dabf9bbd64c71ed702064bb78123a70e7c069c
https://github.com/nodejs/node/blob/8d2e66cae33472f5d4017444fd4116a4db5667d2/lib/internal/streams/destroy.js#L311
https://github.com/nodejs/node/blob/8d2e66cae33472f5d4017444fd4116a4db5667d2/lib/internal/streams/readable.js#L1158
request.abort()
is called when usingfor await (cost chunk of response)