You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a Cordova project with JXCore using this node module.
UPNP discovery basically works, I listen for devices and I can start the discovery. However, stopDiscovery() doesn't seem to work. After starting the discovery, I set a timeout like so:
setTimeout(function(){Mobile('debug').call('Attempt to stop discovery');upnp.stopDiscovery(function(){Mobile('debug').call('Discovery stopped');callback({info: 'Stopped scanning'});process.exit();});},seconds*1000);
Mobile('debug').call('Attempt to stop discovery'); eventually prints the string to the console, so the timeout works. But the callback given to upnp.stopDiscovery() is not executed. Furthermore I can't start the process again without completely restarting the app.
Any idea how to fix this?
Edit: I narrowed it down a bit. In node-upnp-utils.js in the stopDiscovery function, none of the callbacks given to this.sockets[...].close() are executed. For the moment I cannot debug it further than that.
The text was updated successfully, but these errors were encountered:
The node-upnp-utils was developed for Node.js 4+. JXcore based on Node.js 0.10 does not support the arrow function syntax (i.e. (param1, param2, …, paramN) => { statements }) specified in ECMAScript 2015.
I'm afraid that I'm not planning to support older versions of Node than 4. Sorry.
I have a Cordova project with JXCore using this node module.
UPNP discovery basically works, I listen for devices and I can start the discovery. However, stopDiscovery() doesn't seem to work. After starting the discovery, I set a timeout like so:
Mobile('debug').call('Attempt to stop discovery');
eventually prints the string to the console, so the timeout works. But the callback given to upnp.stopDiscovery() is not executed. Furthermore I can't start the process again without completely restarting the app.Any idea how to fix this?
Edit: I narrowed it down a bit. In
node-upnp-utils.js
in the stopDiscovery function, none of the callbacks given tothis.sockets[...].close()
are executed. For the moment I cannot debug it further than that.The text was updated successfully, but these errors were encountered: