Trigger connection loop on config device addition (fixes #7600) (#7604)

* Trigger connection loop on config device addition (fixes #7600)

* Also check for device address equality

* Move EqualStrings from api_test to utils, and use in connections/service.go

* Make sure CommitConfiguration cannot block due on the deviceAddressesChanged channel

* Update lib/connections/service.go

Co-authored-by: Jakob Borg <jakob@kastelo.net>
This commit is contained in:
Gahl Saraf
2021-04-26 21:13:59 +01:00
committed by GitHub
co-authored by Jakob Borg
parent 8734fa65fc
commit 66662cd678
3 changed files with 46 additions and 20 deletions
+12
View File
@@ -280,3 +280,15 @@ func NiceDurationString(d time.Duration) string {
}
return d.String()
}
func EqualStrings(a, b []string) bool {
if len(a) != len(b) {
return false
}
for i := range a {
if a[i] != b[i] {
return false
}
}
return true
}