Open ErwinSteffens opened 4 years ago
Hi @ErwinSteffens,
making that optional sounds good to me. However, instead of making NODE_MDNS_HAVE_INTERFACE_NAME_CONVERSION
a compile-time variable, I'd just use a runtime JS option:
const browser = new mdns.Browser(type, {lookupInterfaceNames: false});
Or is that what you mean?
On a side note, I believe it only terminates your application because you don't have an error handler on the browser. You do want an error handler...
That's not what I meant, but I think it is a better solution. I have made an PR: https://github.com/agnat/node_mdns/pull/245
I agree about the error handler ;-)
We are running into an issue when using the library in docker.
Our node process (using the library) in running in a docker container. The avahi daemon is running on the host OS. We are mounting the dbus system bus socket into the docker container so we can connect to the avahi daemon.
The issue is that when an item is discovered it tries to resolve the interface name in the library, but the interfaces in the container are different then on the host OS. The library crashes on this:
We would like to make the name resolution of the interface optional. We see there is already a
NODE_MDNS_HAVE_INTERFACE_NAME_CONVERSION
define for making this configurable based on OS detection.We would like to suggest to make this configurable by variable.