-
Notifications
You must be signed in to change notification settings - Fork 145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
upnpSearch #55
Comments
I tracked down the cause to be a process.on statement at the end of SSDPSearch function in search.js. |
Thanks for the info, I need to fix this to only register the process.exit listener once, if it is called multiple times during execution. All the existing tests only perform a single lookup, so I missed this one. I would suggest that you utilise the other search function, as this SSDP lookup is a throw back to before Phillips provided the discovery service, which should work better in most cases. |
I am not at a computer with Node.js at the moment, but I think you could change the code at 57-61 to something like this; if (!exitFunction) {
exitFunction = function () {
if (!self.closed) {
_close(self);
}
};
// Clean up if close is not called directly
process.on("exit", exitFunction);
} And put a line at line 8 in the file with: var exitFunction; I think that would prevent it from registering multiple times in your app. I need to put together a test case for this when I get back to a machine I can develop on. |
Thank you very much, tomorrow i will try it (it's night here)! Can the other search function be used without a internet connection? Il giorno mar 18 ago 2015 23:29 Peter Murray [email protected] ha
|
Ah, no, the other function uses the Internet to connect with the hue discovery service, so you are stuck with the SSDP way then. |
…sockets are now racked and ensured that they are closed out via a single listener
When performing some sequential upnpSearch (e.g. to force reconnection upon link going down), node.js EventEmitter gives up since it reaches the maxListeners limit.
The text was updated successfully, but these errors were encountered: