From 7c0d23a048709e57e8aa84e110dc97023e874c17 Mon Sep 17 00:00:00 2001 From: Chris Reeves Date: Tue, 30 Jan 2018 04:59:15 -0500 Subject: [PATCH] [pg-query-stream] pooled clients don't end, they release --- types/pg-query-stream/pg-query-stream-tests.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/pg-query-stream/pg-query-stream-tests.ts b/types/pg-query-stream/pg-query-stream-tests.ts index 1df78ea648..d59286a654 100644 --- a/types/pg-query-stream/pg-query-stream-tests.ts +++ b/types/pg-query-stream/pg-query-stream-tests.ts @@ -12,7 +12,7 @@ const pool = new pg.Pool(); pool.connect((err, client, done) => { const stream = client.query(query); stream.on('end', () => { - client.end(); + client.release(); }); stream.on('data', (data: any) => { console.log(data);