Commit e2bdea8d authored by Jean-Philippe Steinmetz's avatar Jean-Philippe Steinmetz
Browse files

Fixing issue with ConnectionManager that caused existing connections to be recreated

parent f7c3e339
......@@ -29,9 +29,11 @@ class ConnectionManager {
// It's possible that the connection was already configured during a previous run. In that case we will
// attempt to reconnect instead of creating a new connection.
let connection: typeorm.Connection | Redis.Redis | undefined = undefined;
let connection: typeorm.Connection | Redis.Redis | undefined = this.connections.get(name);
try {
connection = typeorm.getConnection(name);
if (!connection) {
connection = typeorm.getConnection(name);
} catch (err) {
// We don't care if a connection was not found
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment