Crash when starting without network connection
Closed this issue · 0 comments
gkubisa commented
lib/index.js:146 self.sock.addMembership(self._ssdpIp) throws an error with code ENODEV, if there is no multicast interface available, for example if a device is not connected to any network. The uncaught exception crashes the application using node-ssdp.
It would be preferable to catch that error and retry later, so that the functionality could be restored, when the network connection becomes available.
A related issue is that currently the "location" option has to be specified when the node-ssdp server starts. It should be possible to make it dynamic, so that it could contain the current IP of the device, rather than be limited to the IP specified on startup.