-
Notifications
You must be signed in to change notification settings - Fork 7.3k
v0.9.12 datagram .addMembership broken #4944
Comments
That's because of 332fea5. var dgram = require('dgram');
var server = dgram.createSocket('udp4');
server.bind(3000, function() {
server.addMembership('224.0.0.14');
}); I'll add a note to the docs and the wiki. |
Thanks for the quick response! (En voor al het werk aan node tot zo ver!) Is there anything else that has changed on UDP? I'm no longer getting the error so soon, but after a while I get ENOENT. If I move all the listeners to the bind's anonymous function I get ENOTFOUND. I'm pretty sure some of the changes to node require me to modify my code, but I can't find what changed and how to alter my code. |
dgram.Socket#bind() is always asynchronous now. Add a note at the top of the documentation that explains how to upgrade. Fixes #4944.
ENOENT and ENOTFOUND suggest that a DNS lookup fails. That's more a transient / environmental issue than it is a node.js issue. But if it's persistent across networks and machines, post a test case and I'll look into it. |
It took me ages, but I found the problem. It does not work without [interface]: But does work when it's set: I've finally moved to 0.10.x Please update the docs or make [interface] optional again (atleast on OS X). |
Fixed in 92023b4. |
var server = dgram.createSocket("udp4");
server.bind(3000);
server.addMembership('224.0.0.14');
dgram.js:368
throw new errnoException(process._errno, 'addMembership');
^
Error: addMembership EBADF
at new errnoException (dgram.js:426:11)
at Socket.addMembership (dgram.js:368:11)
System Version: OS X 10.8.3 (12D76)
This worked on 0.6.x and 0.8.x and the docs show no difference.
The text was updated successfully, but these errors were encountered: