Show startup as one step checklist and re-check tools on the Server tab
This commit is contained in:
@@ -444,9 +444,14 @@ struct ServerView: View {
|
||||
}
|
||||
.task {
|
||||
await refresh()
|
||||
var tick = 0
|
||||
while !Task.isCancelled {
|
||||
try? await Task.sleep(for: .seconds(2))
|
||||
if let current = state, current.on, current.address == nil {
|
||||
try? await Task.sleep(for: .seconds(1))
|
||||
tick += 1
|
||||
if tick % 5 == 0, !busy {
|
||||
checks = await check()
|
||||
}
|
||||
if tick % 2 == 0, let current = state, current.on, current.address == nil {
|
||||
state = await Server.state(loopback: loopback)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user