mirror of https://github.com/Fabio286/antares.git
fix(PostgreSQL): unhandled error on connection lost, fixes #740
This commit is contained in:
parent
23946ff2ce
commit
cdd2a11f8e
|
@ -232,6 +232,10 @@ export class PostgreSQLClient extends BaseClient {
|
||||||
await this.keepAlive();
|
await this.keepAlive();
|
||||||
}, this._keepaliveMs);
|
}, this._keepaliveMs);
|
||||||
|
|
||||||
|
connection.on('error', err => { // Intercepts errors and converts to rejections
|
||||||
|
Promise.reject(err);
|
||||||
|
});
|
||||||
|
|
||||||
return connection;
|
return connection;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue