Skip to content
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

request.destroyed is undefined after request.destroy() #33336

Closed
szmarczak opened this issue May 10, 2020 · 1 comment
Closed

request.destroyed is undefined after request.destroy() #33336

szmarczak opened this issue May 10, 2020 · 1 comment
Labels
http Issues or PRs related to the http subsystem.

Comments

@szmarczak
Copy link
Member

  • Version: v10.20.1 v12.16.3 v13.13.0
  • Platform: Linux solus 5.6.4-152.current deps: update openssl to 1.0.1j #1 SMP PREEMPT Mon Apr 20 03:18:11 UTC 2020 x86_64 GNU/Linux
  • Subsystem: stream

What steps will reproduce the bug?

const https = require('https');

const request = https.get('https://example.com');
request.once('error', () => {});

request.destroy();
console.log(request.destroyed);

How often does it reproduce? Is there a required condition?

Always.

What is the expected behavior?

true

What do you see instead?

undefined

Additional information

This is fixed starting Node.js 14.0.0

@ronag ronag added the http Issues or PRs related to the http subsystem. label May 10, 2020
@ronag
Copy link
Member

ronag commented May 10, 2020

This was fixed in #33131.

It currently has do not land on v10 & v12. I'm not entirely sure whether that is actually necessary. Technically I think it could probably be backported.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
http Issues or PRs related to the http subsystem.
Projects
None yet
Development

No branches or pull requests

2 participants