From 07bf521414bced0f0d0c831a9c1e8ddf965511cc Mon Sep 17 00:00:00 2001 From: Max Goedjen Date: Tue, 26 Aug 2025 00:14:28 -0700 Subject: [PATCH] Working --- Sources/Packages/Sources/SecretAgentKit/SocketController.swift | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Sources/Packages/Sources/SecretAgentKit/SocketController.swift b/Sources/Packages/Sources/SecretAgentKit/SocketController.swift index 2f5e79e..ed4b9d2 100644 --- a/Sources/Packages/Sources/SecretAgentKit/SocketController.swift +++ b/Sources/Packages/Sources/SecretAgentKit/SocketController.swift @@ -22,6 +22,7 @@ public struct Session: Sendable { guard !data.isEmpty else { logger.debug("Socket controller received empty data, ending continuation.") continuation.finish() + try fileHandle.close() return } continuation.yield(data) @@ -37,6 +38,7 @@ public struct Session: Sendable { public func close() throws { logger.debug("Session closed.") + continuation.finish() try fileHandle.close() }