LouisBrunner/avahi2dns

Be more tolerant to startup behavior

Closed this issue · 3 comments

If avahi2dns starts up, it will happily run, even if it cannot connect to the avahi server, because avahi is still starting up, or hasn't started up yet.

While we have certainly a dependency here, avahi2dns should still try to connect on the dbus when connections fail/are not possible.

Hi @oliv3r,

Could you give an example of the avahi2dns logs when you get such an error?

FYI we use https://github.com/holoplot/go-avahi to connect to Avahi. We could add a retry mechanism here if Avahi hasn't started but the issue should probably handled there.

See #8 maybe? The logs don't really print anything. But if avahi2dns starts first and before avahi itself, avahi2dns should 'notice' this and connect when avahi is available. I would expect that avahi itself emits something on the dbus to notify itself on the dbus? But you are probably right that maybe upstream should do this?

I don't mind doing avahi; sleep 5; avahi2dns, but wouldn't mind doing avahi2dns; avahi and still get a working setup. But maybe I think it's not working due to #8?

Ok, I will close this if it's the same issue as #8 then.