From 151bffaad49d554e1b44ada602b97eea3e12fdfe Mon Sep 17 00:00:00 2001 From: Rafa de la Torre Date: Mon, 23 Jul 2018 18:39:30 +0200 Subject: [PATCH] return to avoid further errors As per a PR comment: `return done(err);` should prevent further errors and make sure the request is over. --- app/services/stream_copy.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/services/stream_copy.js b/app/services/stream_copy.js index f7807451..62007a43 100644 --- a/app/services/stream_copy.js +++ b/app/services/stream_copy.js @@ -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'); }