Use Scope.close for WS background scope
- Replace manual release callback with `Scope.close` - Co-authored-by: codex <[email protected]>
This commit is contained in:
1 parent
5cf6f7f3e4
commit
f5bec5e585
1 file changed
+2
-4
@@ -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()}`);
|
||||
|
||||
Reference in new issue
Block a user