Skip to content

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

Description

@szmarczak
  • 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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    httpIssues and PRs related to the http subsystem.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions