You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the dbus connection gets removed (e.g. avahi daemon stops, crashes, etc.), it will never reconnect. This needs to be improved/handled, and also made sure the SHIP service will be reannounced.
I think this should be all done in the avahi library itself. Because also re-announcing services and re-starting running services needs be handled, as well as creating a new dbus connection when that is lost. Right now the dbus connection is passed as an argument, instead it should imho be handled by the library itself.
To what out for a dbus or avahi service disconnect, this code will help:
// Get signals for DBus DisconnectsdbusConn.BusObject().Call("org.freedesktop.DBus.AddMatch", 0, "type='signal',interface='org.freedesktop.DBus.Local'")
// Get signals for Avahi NameOwnerChangeddbusConn.BusObject().Call("org.freedesktop.DBus.AddMatch", 0, "type='signal',interface='org.freedesktop.DBus'")
For dbus disconnects, the signal.Name value to watch out for is org.freedesktop.DBus.Local.Disconnected. For avahi re-/disconnects it is org.freedesktop.DBus.NameOwnerChanged. The avahi c library can be used as a reference.
In addition avahi offers an option to wait for a avahi dbus connection on startup. It might be a good idea to add this as an option for the avahi only mode as well.
The avahi service integration uses https://github.com/holoplot/go-avahi/ which communicates with the avahi daemon via dBUS.
When the dbus connection gets removed (e.g. avahi daemon stops, crashes, etc.), it will never reconnect. This needs to be improved/handled, and also made sure the SHIP service will be reannounced.
There is an issue for that already in the repository: holoplot/go-avahi#21
The text was updated successfully, but these errors were encountered: