Skip to content

Commit b6218fc

Browse files
committed
logs
1 parent 26d2eb8 commit b6218fc

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

Coder-Desktop/Coder-Desktop/State.swift

+8-3
Original file line numberDiff line numberDiff line change
@@ -163,13 +163,18 @@ class AppState: ObservableObject {
163163

164164
refreshTask = Task {
165165
let res = try? await retry(floor: .milliseconds(100), ceil: .seconds(10)) {
166-
let config = try await client.agentConnectionInfoGeneric()
167-
return config.hostname_suffix
166+
do {
167+
let config = try await client.agentConnectionInfoGeneric()
168+
return config.hostname_suffix
169+
} catch {
170+
logger.error("failed to get agent connection info (retrying): \(error)")
171+
throw error
172+
}
168173
}
169174
return res
170175
}
171176

172-
self.hostnameSuffix = await refreshTask?.value ?? Self.defaultHostnameSuffix
177+
hostnameSuffix = await refreshTask?.value ?? Self.defaultHostnameSuffix
173178
}
174179
}
175180

0 commit comments

Comments
 (0)