return to avoid further errors

As per a PR comment: `return done(err);` should prevent further errors
and make sure the request is over.
This commit is contained in:
Rafa de la Torre 2018-07-23 18:39:30 +02:00
parent 21295a2d93
commit 151bffaad4

View File

@ -53,7 +53,7 @@ module.exports = class StreamCopy {
cancelingClient.cancel(client, pgstream);
// see https://node-postgres.com/api/pool#releasecallback
done(err);
return done(err);
} else if (action === ACTION_FROM) {
client.connection.sendCopyFail('CARTO SQL API: Connection closed by client');
}