mirror of
https://github.com/maxgoedjen/secretive.git
synced 2026-03-10 03:27:23 +01:00
Move inputParser inside task scope to avoid races.
This commit is contained in:
@@ -35,9 +35,9 @@ class AppDelegate: NSObject, NSApplicationDelegate {
|
||||
func applicationDidFinishLaunching(_ aNotification: Notification) {
|
||||
logger.debug("SecretAgent finished launching")
|
||||
Task {
|
||||
let inputParser = try await XPCAgentInputParser()
|
||||
for await session in socketController.sessions {
|
||||
Task {
|
||||
let inputParser = try await XPCAgentInputParser()
|
||||
do {
|
||||
for await message in session.messages {
|
||||
let request = try await inputParser.parse(data: message)
|
||||
|
||||
Reference in New Issue
Block a user