Fix issue with reconnecting to Pi-hole after forgetting

This commit is contained in:
William Brawner 2022-09-25 22:58:53 -06:00
parent a0bc5b98cf
commit a4ad6443e3

View file

@ -62,7 +62,7 @@ class PiHoleDataStore: ObservableObject {
}
func monitorStatus() async {
while !Task.isCancelled {
while apiKey != nil && baseUrl != nil && !Task.isCancelled {
do {
try await Task.sleep(nanoseconds: 1_000_000_000)
await loadSummary()