maintain req error handler
This commit is contained in:
parent
319b64e20c
commit
9eeeadbc07
@ -115,6 +115,10 @@ function handleCopyFrom (logger) {
|
||||
|
||||
req
|
||||
.on('data', data => isGzip ? metrics.addGzipSize(data.length) : undefined)
|
||||
.on('error', err => {
|
||||
metrics.end(null, err);
|
||||
pgstream.emit('error', err);
|
||||
})
|
||||
.on('close', () => {
|
||||
const err = new Error('Connection closed by client');
|
||||
pgstream.emit('cancelQuery', err);
|
||||
|
Loading…
Reference in New Issue
Block a user