Skip to content

Commit 37dad3c

Browse files
juliusmarmingevoltcrash
authored andcommitted
fix(server): release bootstrap readers before completing startup input
1 parent 4e7f238 commit 37dad3c

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎apps/server/src/bootstrap.ts‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,10 @@ export const readBootstrapEnvelope = Effect.fn("readBootstrapEnvelope")(function
124124
stream.destroy();
125125
};
126126

127-
const finish = (result: Parameters<typeof resume>[0]) =>
128-
resume(result.pipe(Effect.ensuring(Effect.sync(cleanup))));
127+
const finish = (result: Parameters<typeof resume>[0]) => {
128+
cleanup();
129+
resume(result);
130+
};
129131

130132
const handleError = (error: Error) => {
131133
finish(

0 commit comments

Comments
 (0)