homebridge / ciao

RFC 6762 and RFC 6763 compliant mdns service discovery library written in Typescript

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Open Handles after creating and closing a service

Supereg opened this issue · comments

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

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.