()
| 2382 | let socket: Duplex |
| 2383 | let timer: ReturnType<typeof setTimeout> | undefined |
| 2384 | const finish = (): void => { |
| 2385 | if (done) return |
| 2386 | done = true |
| 2387 | if (timer !== undefined) clearTimeout(timer) |
| 2388 | socket?.destroy() |
| 2389 | resume(Effect.void) |
| 2390 | } |
| 2391 | const frame = PgProtocol.encodeCancelRequest({ pid: session.processId, secret: session.secretKey }) |
| 2392 | // After the frame is written the server processes the request and closes |
| 2393 | // the connection, which lands in the `close` handler. |