diff --git a/src/dialects/postgres/connection-manager.js b/src/dialects/postgres/connection-manager.js index 6b8f30a0b7b1..2b1bf6894f23 100644 --- a/src/dialects/postgres/connection-manager.js +++ b/src/dialects/postgres/connection-manager.js @@ -203,7 +203,7 @@ class ConnectionManager extends AbstractConnectionManager { }); // Don't let a Postgres restart (or error) to take down the whole app - connection.once('error', error => { + connection.on('error', error => { connection._invalid = true; debug(`connection error ${error.code || error.message}`); this.pool.destroy(connection);