Do not emit error when the client closes the connection in `copyto`
Opened this issue · 0 comments
dgaubert commented
[2020-05-20 13:06:33.739] [ERROR] console - Error: Connection closed by client
at ServerResponse.<anonymous> (/home/ubuntu/www/node-sql-api/releases/20200520073947/lib/api/sql/copy-controller.js:95:59)
at ServerResponse.emit (events.js:310:20)
at emitCloseNT (_http_server.js:711:8)
at processTicksAndRejections (internal/process/task_queues.js:83:21)
As the behavior of event end
has changed in Node.js 12 it's logging this error. Luckily it isn't breaking anything as the copyto
is working fine, just the connection to the database is being closed after the query ends then the pool creates a new one.