Removing unpipe calls, regarding documentation, unpipe is emitted when error.
This commit is contained in:
parent
c0b5997745
commit
73eb9656cd
@ -86,7 +86,6 @@ function handleCopyTo (logger) {
|
||||
.on('data', data => metrics.addSize(data.length))
|
||||
.on('error', err => {
|
||||
metrics.end(null, err);
|
||||
pgstream.unpipe(res);
|
||||
|
||||
return next(err);
|
||||
})
|
||||
@ -154,8 +153,6 @@ function handleCopyFrom (logger) {
|
||||
.pipe(pgstream)
|
||||
.on('error', err => {
|
||||
metrics.end(null, err);
|
||||
req.unpipe(decompress);
|
||||
decompress.unpipe(pgstream);
|
||||
|
||||
return next(err);
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user