Skip to content

Open Handles after creating and closing a service #27

@bauer-andreas

Description

@bauer-andreas

Analysis

When creating a new responder and a new ciao service, not evening advertising it, and thereafter destroying the ciao service again there are still open handles in the system.

// TODO fix: CiaoAdvertiser constructor creates open handles!
// const advertiser = new CiaoAdvertiser(accessoryInfoUnpaired);

advertiser.destroy();

Expected Behavior

There shouldn't be any open handles (e.g. sockets, timeouts, etc). This e.g. stops the process from exiting, specifically noticeable in testing environments.

Steps To Reproduce

In the environment of HAP-NodeJS do the following code steps to reproduce:

const advertiser = new CiaoAdvertiser(accessoryInfoUnpaired);

// ....

advertiser.destroy();

Logs

-

Configuration

-

Environment

  • OS: macOS 13.0.1
  • Software: HAP-NodeJS 0.11.0
  • Node: 19.0.1
  • npm: 8.19.2

Process Supervisor

not applicable

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinglong runningIssues which should be excluded from the stale bot

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions