Wait for the server's tailnet peer before connecting at app startup

This commit is contained in:
Ian Gulliver
2026-10-20 14:52:10 -07:00
parent a2571763b4
commit a95e0ddb29
5 changed files with 83 additions and 12 deletions
+1 -1
View File
@@ -115,7 +115,7 @@ final class Remote {
case .success:
self.receive(task)
case .failure(let error):
log.notice("client connection closed:\(errorText(error), privacy: .public)")
log.notice("client connection closed:\(errorText(error), privacy: .public); \(tailnetNode.peerState(self.api.origin.host()!), privacy: .public)")
self.ws = nil
try? await Task.sleep(for: retryAfter)
self.start()