Skip to content

request.abort() still destroys the socket on a successful request #32851

Closed
@szmarczak

Description

@szmarczak
  • Version: v13.12.0
  • Platform: Linux solus 5.5.11-151.current #1 SMP PREEMPT Tue Mar 24 18:06:46 UTC 2020 x86_64 GNU/Linux
  • Subsystem: http

What steps will reproduce the bug?

$ node
Welcome to Node.js v13.12.0.
Type ".help" for more information.
> z = https.get('https://google.com', {agent: new https.Agent({keepAlive: true})})
ClientRequest { ... }
> z._ended
true
> z.socket.destroyed
false
> z.abort()
undefined
> z.socket.destroyed
true
> 

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

Always.

What is the expected behavior?

The socket should be still alive.

What do you see instead?

The socket is destroyed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    httpIssues or 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