chore: generate
This commit is contained in:
@@ -39,13 +39,16 @@ export function websocket(
|
||||
Effect.catchReason("SocketError", "SocketCloseError", () => Effect.void),
|
||||
Effect.catch(() => Effect.void),
|
||||
)
|
||||
const closeAccepted = Effect.all(
|
||||
[closeSocket(inbound, writeInbound), closeSocket(outbound, writeOutbound)],
|
||||
{ concurrency: "unbounded", discard: true },
|
||||
)
|
||||
const closeAccepted = Effect.all([closeSocket(inbound, writeInbound), closeSocket(outbound, writeOutbound)], {
|
||||
concurrency: "unbounded",
|
||||
discard: true,
|
||||
})
|
||||
const registered = yield* WebSocketTracker.register(
|
||||
Effect.all(
|
||||
[writeInbound(WebSocketTracker.SERVER_CLOSING_EVENT()), writeOutbound(WebSocketTracker.SERVER_CLOSING_EVENT())],
|
||||
[
|
||||
writeInbound(WebSocketTracker.SERVER_CLOSING_EVENT()),
|
||||
writeOutbound(WebSocketTracker.SERVER_CLOSING_EVENT()),
|
||||
],
|
||||
{ concurrency: "unbounded", discard: true },
|
||||
),
|
||||
)
|
||||
|
||||
@@ -32,7 +32,12 @@ export const layer = Layer.sync(Service)(() => {
|
||||
const active = Array.from(sockets)
|
||||
sockets.clear()
|
||||
yield* Effect.all(
|
||||
active.map((close) => close.pipe(Effect.timeout("1 second"), Effect.catch(() => Effect.void))),
|
||||
active.map((close) =>
|
||||
close.pipe(
|
||||
Effect.timeout("1 second"),
|
||||
Effect.catch(() => Effect.void),
|
||||
),
|
||||
),
|
||||
{ concurrency: "unbounded", discard: true },
|
||||
)
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user