From f5bec5e585d525dadbd8f12374a8cfff88b0afe1 Mon Sep 17 00:00:00 2001 From: Julius Marminge Date: Sun, 5 Apr 2026 17:50:36 -0700 Subject: [PATCH] Use Scope.close for WS background scope - Replace manual release callback with `Scope.close` - Co-authored-by: codex --- apps/server/src/ws.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/apps/server/src/ws.ts b/apps/server/src/ws.ts index 5bd18b2f24..02f3f6018a 100644 --- a/apps/server/src/ws.ts +++ b/apps/server/src/ws.ts @@ -1,4 +1,4 @@ -import { Cause, Effect, Exit, Layer, Option, Queue, Ref, Schema, Scope, Stream } from "effect"; +import { Cause, Effect, Layer, Option, Queue, Ref, Schema, Scope, Stream } from "effect"; import { CommandId, EventId, @@ -67,9 +67,7 @@ const WsRpcLayer = WsRpcGroup.toLayer( const workspaceEntries = yield* WorkspaceEntries; const workspaceFileSystem = yield* WorkspaceFileSystem; const projectSetupScriptRunner = yield* ProjectSetupScriptRunner; - const wsBackgroundScope = yield* Effect.acquireRelease(Scope.make(), (scope) => - Scope.close(scope, Exit.void), - ); + const wsBackgroundScope = yield* Effect.acquireRelease(Scope.make(), Scope.close); const serverCommandId = (tag: string) => CommandId.makeUnsafe(`server:${tag}:${crypto.randomUUID()}`);