New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Do not use deprecated request.abort()
#1242
Conversation
Replaced request.abort() with request.detroy() Replaced "abort" event with "close" on request
|
The |
Yeah, I missed the stream test, I was fixing them. |
I noticed a bug. z = require('.').stream('https://example.com');
z.resume();
z.once('end', () => { console.log('end'); });
// If you wait for the `end` event, then console.log(z.aborted) it will give you `true`
// That's because the this[kResponse].complete is false for some reason But that doesn't happen with the native Node.js module only: require('https').get('https://example.com', response => { response.resume(); response
.once('end', () => { console.log(response.complete); }); }) |
Fortunately I'm about to fix it |
Unfortunately it's harder than it seems 😅 |
At least I know that it's caused somehow by |
Tests pass on Node.js 14, but fail on 10, 12 and 13. I'll fix this now. |
request.abort()
Thanks! 🙌 Nice work. |
Checklist
Fixes #1216