diversario / node-ssdp

node.js SSDP client/server.
MIT License
274 stars 117 forks source link

Uncaught error when running on machine with no active network #74

Closed hardillb closed 7 years ago

hardillb commented 7 years ago

When running discovery on a machine that currently has no active network (e.g. moved out of wifi range) then I get the following error:

TypeError: Cannot read property 'addMembership' of null at addMembership [as _onTimeout] (/home/hardillb/.node-red/node_modules/node-red-node-wemo/node_modules/node-ssdp/lib/index.js:183:18) at Timer.listOnTimeout (timers.js:92:15)

It looks like there is a test wrapped round the addMembership call but no check to see if _createSocket returns null.

diversario commented 7 years ago

Should be fixed in v2.9.1 and 3.2.1.