Revert a bit of the change

This commit is contained in:
Brian M. Carlson 2020-02-20 17:39:56 -06:00
parent 7c7a3b884d
commit 2c27edf9d8

View File

@ -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)
})
}
}