kopiro / homebridge-playstation

Playstation integration for Homebridge / HOOBS.
Apache License 2.0
96 stars 9 forks source link

Homebridge is reporting a memory leak with this plugin [v1.6.0] #103

Open SawkeeReemo opened 4 months ago

SawkeeReemo commented 4 months ago

Describe The Bug: Upon starting Homebridge, I'm seeing a MemoryLeak error from this plugin.

To Reproduce: Restart Homebridge.

Expected behavior: No memory leaks.

Logs:

(node:13690) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 message listeners added to [Socket]. Use emitter.setMaxListeners() to increase limit
    at _addListener (node:events:591:17)
    at Socket.addListener (node:events:609:10)
    at UdpDiscoveryNetworkFactory.createRawMessages (/homebridge/node_modules/homebridge-playstation/node_modules/playactor/dist/discovery/udp.js:132:16)
    at UdpDiscoveryNetworkFactory.createMessages (/homebridge/node_modules/homebridge-playstation/node_modules/playactor/dist/discovery/udp.js:113:21)
    at UdpDiscoveryNetworkFactory.createDevices (/homebridge/node_modules/homebridge-playstation/node_modules/playactor/dist/discovery/udp.js:148:21)
    at /homebridge/node_modules/homebridge-playstation/node_modules/playactor/dist/discovery/standard.js:16:99
    at Array.map (<anonymous>)
    at Object.createDevices (/homebridge/node_modules/homebridge-playstation/node_modules/playactor/dist/discovery/standard.js:16:76)
    at Discovery.discover (/homebridge/node_modules/homebridge-playstation/node_modules/playactor/dist/discovery.js:22:45)

Plugin Config:

{
    "pollInterval": 5000,
    "overrides": [
        {
            "name": "PlayStation5"
        }
    ],
    "platform": "playstation",
    "_bridge": {
        "username": <username>,
        "port": <port#>
    }
}

Screenshots: N/A

Environment: