Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

resource leak in http.js #2069

Closed
Closed
@quexer

Description

Here're codes from "Agent.prototype.removeSocket" in http.js

...

  if (this.sockets[name]) {
    var index = this.sockets[name].indexOf(s);
    if (index !== -1) {
      this.sockets[name].splice(index, 1);
    }
  } else if (this.sockets[name] && this.sockets[name].length === 0) {
    // don't leak
    delete this.sockets[name];
    delete this.requests[name];
  }

...

The "else if" branch is unreachable.

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions