From bc19a37acf569836fde2737b864f3eb25f2c7100 Mon Sep 17 00:00:00 2001 From: Max Goedjen Date: Wed, 22 Apr 2026 16:48:56 -0700 Subject: [PATCH] Restrict connectionAcceptedNotifications to creating filehandle --- Sources/Packages/Sources/SecretAgentKit/SocketController.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/Packages/Sources/SecretAgentKit/SocketController.swift b/Sources/Packages/Sources/SecretAgentKit/SocketController.swift index 7839037..613f6db 100644 --- a/Sources/Packages/Sources/SecretAgentKit/SocketController.swift +++ b/Sources/Packages/Sources/SecretAgentKit/SocketController.swift @@ -39,7 +39,7 @@ public struct SocketController { Task { @MainActor [fileHandle, sessionsContinuation, logger] in // Create the sequence before triggering the notification to // ensure it will not be missed. - let connectionAcceptedNotifications = NotificationCenter.default.notifications(named: .NSFileHandleConnectionAccepted) + let connectionAcceptedNotifications = NotificationCenter.default.notifications(named: .NSFileHandleConnectionAccepted, object: fileHandle) fileHandle.acceptConnectionInBackgroundAndNotify()