fix(bus): acquire PubSub subscription eagerly to close /event race (#27959)
This commit is contained in:
parent
5bfd7fd16c
commit
cb35493242
1 changed files with 659 additions and 43 deletions
|
|
@ -243,7 +243,7 @@ export const layer = Layer.effect(
|
|||
}
|
||||
|
||||
// Subscribe to bus events, fiber interrupted when scope closes
|
||||
yield* bus.subscribeAll().pipe(
|
||||
yield* (yield* bus.subscribeAll()).pipe(
|
||||
Stream.runForEach((input) =>
|
||||
Effect.sync(() => {
|
||||
for (const hook of hooks) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue