From 2c27edf9d8307f718292913727fca9e59ad8862f Mon Sep 17 00:00:00 2001 From: "Brian M. Carlson" Date: Thu, 20 Feb 2020 17:39:56 -0600 Subject: [PATCH] Revert a bit of the change --- packages/pg/lib/client.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/pg/lib/client.js b/packages/pg/lib/client.js index 596d3dec..375bdcbd 100644 --- a/packages/pg/lib/client.js +++ b/packages/pg/lib/client.js @@ -563,10 +563,10 @@ Client.prototype.end = function (cb) { } if (cb) { - this.connection.stream.once('close', cb) + this.connection.once('end', cb) } else { return new this._Promise((resolve) => { - this.connection.stream.once('close', resolve) + this.connection.once('end', resolve) }) } }