Do not use the regular callback in streams events

This commit is contained in:
Daniel García Aubert 2018-06-13 18:28:34 +02:00
parent 7d1a0abadd
commit b9971d94dd

View File

@ -25,7 +25,6 @@ module.exports = class StreamCopy extends EventEmitter {
.on('error', err => {
if (!this.connectionClosedByClient) {
done(err);
cb(err, pgstream);
}
})
.on('end', () => {
@ -49,8 +48,6 @@ module.exports = class StreamCopy extends EventEmitter {
pgstream
.on('error', err => {
done();
cb(err, pgstream);
})
.on('end', () => {
done();