Reconnect the app's command channel after sleep; list clients from it
This commit is contained in:
@@ -95,6 +95,8 @@ func errorText(_ error: any Error) -> String {
|
||||
return String(describing: e)
|
||||
}
|
||||
|
||||
private let clientID = UUID().uuidString
|
||||
|
||||
final class API: Sendable {
|
||||
let origin: URL
|
||||
let session: URLSession
|
||||
@@ -104,6 +106,7 @@ final class API: Sendable {
|
||||
self.origin = origin
|
||||
let config = URLSessionConfiguration.default
|
||||
config.httpAdditionalHeaders = [
|
||||
"Byre-Client": clientID,
|
||||
"Byre-Commit": Bundle.main.object(forInfoDictionaryKey: "ByreCommit") as! String,
|
||||
"Byre-Host": Host.current().localizedName ?? ProcessInfo.processInfo.hostName,
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user