(s: State, name: string)
| 552 | ) |
| 553 | |
| 554 | function closeClient(s: State, name: string) { |
| 555 | const client = s.clients[name] |
| 556 | delete s.clients[name] |
| 557 | delete s.defs[name] |
| 558 | delete s.instructions[name] |
| 559 | if (!client) return Effect.void |
| 560 | return Effect.tryPromise(() => client.close()).pipe(Effect.ignore) |
| 561 | } |
| 562 | |
| 563 | const storeClient = Effect.fnUntraced(function* ( |
| 564 | s: State, |