send CopyFail when user close connection
This commit is contained in:
parent
a083eb909c
commit
310f652ae4
@ -61,8 +61,9 @@ module.exports = {
|
||||
})
|
||||
.on('close', () => {
|
||||
if (!requestEnded) {
|
||||
const connection = client.connection;
|
||||
connection.sendCopyFail();
|
||||
req.unpipe(pgstream);
|
||||
pgstream.end();
|
||||
return cb(new Error('Connection closed by client'));
|
||||
}
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user