Error: write ENOTSUP
diegocr opened this issue · 1 comments
diegocr commented
events.js:174
throw er; // Unhandled 'error' event
^
Error: write ENOTSUP
at ChildProcess.target._send (internal/child_process.js:750:20)
at ChildProcess.target.send (internal/child_process.js:634:19)
at sendHelper (internal/cluster/utils.js:24:15)
This error is throw in Windows when using node-ssdp from a cluster's worker - long story short, the socket needs to be bind'ed with the exclusive
flag set.
diegocr commented
Actually there is a quite trivial workaround for this:
const SSDP = require('node-ssdp').Server, server = new SSDP({
reuseAddr: false,
sourcePort: {
port: 1900, exclusive: true
},
......
});
Although this throws the warning:
WARNING: SSDP server `sourcePort` option is set to non-SSDP port....
but meh, it does work now :)