From ef6265c1c5272ca4d614559cddae8e55aa8893af Mon Sep 17 00:00:00 2001 From: Rune Olsen Date: Tue, 11 Aug 2026 10:45:17 +0200 Subject: [PATCH] Fix actor-isolation warning in CLIServerService's connection handler sendAndClose is main-actor-isolated (implicit under -default-isolation MainActor), but the Task in readRequest's Network.framework callback runs nonisolated (DisableOutwardActorInference means it no longer inherits the class's actor from lexical context). Calling sendAndClose without hopping onto the actor is a hard error in Swift 6 mode. --- oAI/Services/CLIServerService.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/oAI/Services/CLIServerService.swift b/oAI/Services/CLIServerService.swift index dcd6017..4b1e626 100644 --- a/oAI/Services/CLIServerService.swift +++ b/oAI/Services/CLIServerService.swift @@ -132,7 +132,7 @@ final class CLIServerService { if let body = Self.parseRequestBody(from: buffer) { Task { let responseData = await self.processRequest(body) - self.sendAndClose(responseData, on: connection) + await self.sendAndClose(responseData, on: connection) } return }