Merge pull request #3415 from weaveworks/db-panic

prevent a case where tryOps endsup called recursivley when persisted data exists but has empty data
This commit is contained in:
Bryan Boreham authored and GitHub committed 2018-11-01 11:05:06 +00:00
commit ba469bd641
1 file changed
+1 -1
+1 -1
View File
@@ -985,7 +985,7 @@ func (alloc *Allocator) loadPersistedData() bool {
alloc.persistOwned()
}
if !nameFound || !ringFound {
if !nameFound || !ringFound || persistedRing == nil || persistedRing.Empty() {
overwritePersisted("No valid persisted data")
return false
}