mirror of
https://github.com/Fabio286/antares.git
synced 2025-06-05 21:59:22 +02:00
fix(PostgreSQL): unhandled error on connection lost, fixes #740
This commit is contained in:
@ -232,6 +232,10 @@ export class PostgreSQLClient extends BaseClient {
|
||||
await this.keepAlive();
|
||||
}, this._keepaliveMs);
|
||||
|
||||
connection.on('error', err => { // Intercepts errors and converts to rejections
|
||||
Promise.reject(err);
|
||||
});
|
||||
|
||||
return connection;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user