From 01b1bb29c913ff44b24e47aad09c4149f5cbd6e5 Mon Sep 17 00:00:00 2001 From: YG Park Date: Wed, 24 Apr 2024 12:15:20 +0900 Subject: [PATCH] Add try catch to connect() --- packages/orm/ioredis/src/utils/registerConnectionProvider.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/orm/ioredis/src/utils/registerConnectionProvider.ts b/packages/orm/ioredis/src/utils/registerConnectionProvider.ts index 1fe60006235..81a4a9871aa 100644 --- a/packages/orm/ioredis/src/utils/registerConnectionProvider.ts +++ b/packages/orm/ioredis/src/utils/registerConnectionProvider.ts @@ -69,7 +69,9 @@ export function registerConnectionProvider({provide, name = "default"}: CreateCo } as RedisOptions); } - await connection.connect(); + try { + await connection.connect(); + } catch (e) {} logger.info("Connected to redis database...");