mirror of
https://github.com/nikdoof/hapz2m.git
synced 2026-01-30 04:38:20 +00:00
Don't start HAP server without any devices
This ensures that when iOS reconnects, it doesn't find an empty server and thinks all the devices have been removed, and removes them all locally.
This commit is contained in:
@@ -212,6 +212,11 @@ func (br *Bridge) WaitConfigured() {
|
||||
}
|
||||
}
|
||||
|
||||
// Return number of devices added to the bridge.
|
||||
func (br *Bridge) NumDevices() int {
|
||||
return len(br.devices)
|
||||
}
|
||||
|
||||
// Connects to the MQTT server.
|
||||
// Blocks until the connection is established, then auto-reconnect logic takes over
|
||||
func (br *Bridge) ConnectMQTT() error {
|
||||
|
||||
Reference in New Issue
Block a user