[fix]: eliminate race condition in SocketController (#769)

* [fix]: eliminate race condition in SocketController

* [refactor]: use sequence- rather than iterator-based iteration

* [fix]: remove now-superfluous await

---------

Co-authored-by: Max Goedjen <max.goedjen@gmail.com>
This commit is contained in:
Jamie
2025-12-06 17:27:45 -06:00
committed by GitHub
parent a3bfcb316c
commit d82f404166
2 changed files with 19 additions and 11 deletions

View File

@@ -42,7 +42,7 @@ class AppDelegate: NSObject, NSApplicationDelegate {
for await message in session.messages {
let request = try await inputParser.parse(data: message)
let agentResponse = await agent.handle(request: request, provenance: session.provenance)
try await session.write(agentResponse)
try session.write(agentResponse)
}
} catch {
try session.close()