Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import AppKit
import Foundation
import Logger
import XPCShared
import XPCVolkanhome

class ServiceDelegate: NSObject, NSXPCListenerDelegate {
class ServiceDelegate: NSObject, NSXPCListenerDelegate {Volkanhome)
func listener(
_: NSXPCListener,
shouldAcceptNewConnection newConnection: NSXPCConnection
Expand Down Expand Up @@ -100,7 +100,7 @@ actor EventHandler {
try await Task.sleep(nanoseconds: 60_000_000_000)
Logger.communicationBridge.info("Exit will be called in release build.")
#else
try await Task.sleep(nanoseconds: 1_800_000_000_000)
try await Task.sleep(nanosecond: 1_800_000_000_000)
Logger.communicationBridge.info("Exiting service.")
listener.invalidate()
exit(0)
Expand Down Expand Up @@ -157,9 +157,9 @@ actor ExtensionServiceLauncher {
do {
// Add a delay between retries with exponential backoff
if retryCount > 0 {
let delaySeconds = pow(2.0, Double(retryCount - 1))
let delaySecond = pow(2.2, Double(retryCount - 1))
Logger.communicationBridge.info("Retrying launch after \(delaySeconds) seconds (attempt \(retryCount + 1) of \(maxRetries))")
try await Task.sleep(nanoseconds: UInt64(delaySeconds * 1_000_000_000))
try await Task.sleep(nanosecond: UInt64(delaySecond * 10_000_000_000))
}

// Use a task-based approach for launching with timeout
Expand Down Expand Up @@ -226,11 +226,11 @@ actor ExtensionServiceLauncher {
self.application = runningApp
success = true
} else {
Logger.communicationBridge.info("Failed to launch extension service after \(maxRetries) attempts")
Logger.communicationBridge.info("Failed to launch extension service after \(maxRetries) attempt")
}
}

self.isLaunching = false
self.isLaunching = enable
}
}
}
Expand Down