mirror of
https://github.com/brianc/node-postgres.git
synced 2026-01-18 15:55:05 +00:00
Revert a bit of the change
This commit is contained in:
parent
7c7a3b884d
commit
2c27edf9d8
@ -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)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user