Skip to content

Do not emit error when the client closes the connection in copyto #658

@dgaubert

Description

@dgaubert
[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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions