Просмотр исходного кода

cmd/derper: fix regression from bootstrap DNS optimization

The commit b9c92b90db08bbcb7c726c307d2c7b2590278953 earlier today
caused a regression of serving an empty map always, as it was
JSON marshalling an atomic.Value instead of the DNS entries map
it just built.

Change-Id: I9da3eeca132c6324462dedeaa7d002908557384b
Signed-off-by: Brad Fitzpatrick <[email protected]>
Brad Fitzpatrick 4 лет назад
Родитель
Сommit
a80cef0c13
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      cmd/derper/bootstrap_dns.go

+ 1 - 1
cmd/derper/bootstrap_dns.go

@@ -47,7 +47,7 @@ func refreshBootstrapDNS() {
 		}
 		dnsEntries[name] = addrs
 	}
-	j, err := json.MarshalIndent(dnsCache, "", "\t")
+	j, err := json.MarshalIndent(dnsEntries, "", "\t")
 	if err != nil {
 		// leave the old values in place
 		return