mirror of
https://github.com/brianc/node-postgres.git
synced 2026-01-18 15:55:05 +00:00
Use readyState because pending doesn't exist in node 8.x
This commit is contained in:
parent
2c27edf9d8
commit
81bf8b3f59
@ -546,7 +546,7 @@ Client.prototype.end = function (cb) {
|
||||
this._ending = true
|
||||
|
||||
// if we have never connected, then end is a noop, callback immediately
|
||||
if (this.connection.stream.pending && !this.connection.stream.connecting) {
|
||||
if (this.connection.stream.readyState === 'closed') {
|
||||
if (cb) {
|
||||
cb()
|
||||
} else {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user