Fix EEBUS setup timing issue (#5527)
The EBBUS server should not be started in a go-routine. If avahi connection takes too long, it can happen that devices are registered and thus searched for, before mDNS setup is complete. This change results in a slower startup, roughly 1s, as checking if avahi is available is now blocking. I’ll check if I can change the setup code to be non blocking and device registrations not to cause issues when the mDNS server is not ready. See https://github.com/enbility/eebus-go/issues/44
This commit is contained in:
parent
80ff551699
commit
f552fd61b8
1 changed files with 1 additions and 1 deletions
|
|
@ -198,7 +198,7 @@ func configureEEBus(conf map[string]interface{}) error {
|
|||
return fmt.Errorf("failed configuring eebus: %w", err)
|
||||
}
|
||||
|
||||
go server.EEBusInstance.Run()
|
||||
server.EEBusInstance.Run()
|
||||
shutdown.Register(server.EEBusInstance.Shutdown)
|
||||
|
||||
return nil
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue