Skip to content
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

Error: write ENOTSUP #98

Open
diegocr opened this issue May 2, 2019 · 1 comment
Open

Error: write ENOTSUP #98

diegocr opened this issue May 2, 2019 · 1 comment

Comments

@diegocr
Copy link

diegocr commented May 2, 2019

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.

See wankdanker/node-discover#18

@diegocr
Copy link
Author

diegocr commented May 2, 2019

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 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant