bonjour icon indicating copy to clipboard operation
bonjour copied to clipboard

Program crashing because of server module (through multicastdns) throwing EADDRNOTAVAIL

Open Menlog-DD opened this issue 4 years ago • 3 comments

Hello,

Multicastdns from Server module (mdns-server.js) is throwing an error (EADDRNOTAVAIL ) coming from inner function setMulticastInterface as specified in dgram's documentation https://nodejs.org/api/dgram.html#dgram_call_results

I can't find a way to catch it from my own code except with process.on('uncaughtExcetion') which i find pretty ugly

Is there a way to catch this exception properly ? Am i missing something here or is there no better way ?

Menlog-DD avatar Aug 04 '21 14:08 Menlog-DD

Is this a duplicate of #18?

thom-nic avatar Jun 23 '22 18:06 thom-nic

Is this a duplicate of #18?

Hello Thom-nic ! Ty for your time

The scenario described in #18 is not the same as the one i encountered

I met the issue of handling this exception while trying to publish twice the same service name on the same network from the same computer (it happens when starting 2 instances of our program)

I have solutions to address my particular scenario, but the issue I wanted to point out was that the exception thrown does not seem to be catchable (unless I am missing something)

Menlog-DD avatar Jun 28 '22 07:06 Menlog-DD

Either way, I'm going to suggest for anyone using this library in a production environment either migrate to bonjour-service or @homebridge/ciao. This project is unmaintained, it has not seen a single commit in 6 years (!)

thom-nic avatar Jun 28 '22 16:06 thom-nic